def get_crawls(start=None, end=None):
    st = time.time()
    log.debug("Fetching crawls to process.")
    extra_query = []
    start and end and extra_query.append(
        "p.start_time BETWEEN '{0}' AND '{1}'".format(
        start.isoformat(), end.isoformat()))
    query = """SELECT id FROM main_crawl p WHERE
        p.groups_available * {crawl_threshold} < p.groups_downloaded AND
        NOT EXISTS (SELECT id FROM main_crawlagregates WHERE crawl_id = p.id)
        {extra_limit}"""
    extra_qstr = ' AND ' + ' AND '.join(extra_query) if extra_query else ''
    query = query.format(extra_limit=extra_qstr,
        crawl_threshold=settings.INCOMPLETE_CRAWL_THRESHOLD)
    results = query_to_dicts(query)
    log.debug("Crawls fetched in {0}s.".format(time.time() - st))
    return results
Get layer parameters. All parameters are needed for optimization, but
dataset/ETHPy150Open ipeirotis/Mturk-Tracker/app/mturk/main/management/commands/db_update_agregates.py/get_crawls--crossover with--dataset/ETHPy150Open NervanaSystems/neon/neon/layers/layer.py/Layer.get_description