def delete_counts(cls, crawler): for level in cls.LEVELS: conn.delete(make_key(crawler, "events", "count", level)) for run_id in Crawl.run_ids(crawler): for level in cls.LEVELS: conn.delete(make_key(crawler, "events", "count", run_id, level)) # noqa for stage in crawler.stages.keys(): for level in cls.LEVELS: conn.delete(make_key(crawler, "events", "count", stage, level))
def flush(cls, crawler): for stage in crawler.stages: conn.delete(make_key(crawler, stage)) for run_id in cls.run_ids(crawler): conn.delete(make_key(crawler, run_id)) conn.delete(make_key(crawler, run_id, "start")) conn.delete(make_key(crawler, run_id, "end")) conn.delete(make_key(crawler, run_id, "total_ops")) conn.delete(make_key(crawler, "runs")) conn.delete(make_key(crawler, "current_run")) conn.delete(make_key(crawler, "total_ops")) conn.delete(make_key(crawler, "last_run")) conn.delete(make_key(crawler, "runs_abort"))
def delete_data(cls, crawler): conn.delete(make_key(crawler, "events")) for level in cls.LEVELS: conn.delete(make_key(crawler, "events", level)) for run_id in Crawl.run_ids(crawler): conn.delete(make_key(crawler, "events", run_id)) for level in cls.LEVELS: conn.delete(make_key(crawler, "events", run_id, level)) for stage in crawler.stages.keys(): conn.delete(make_key(crawler, "events", stage)) for level in cls.LEVELS: conn.delete(make_key(crawler, "events", stage, level))
def flush(cls, crawler): conn.delete(make_key('queue_pending', crawler)) for name in crawler.stages.keys(): conn.delete(make_key('queue', crawler, name))