Beispiel #1
0
 def flush(self):
     """Delete all run-time data generated by this crawler."""
     Queue.flush(self)
     Tag.delete(self)
     Event.delete(self)
     CrawlerState.flush(self)
     CrawlerRun.flush(self)
Beispiel #2
0
 def last_run(self):
     return CrawlerState.last_run(self)
Beispiel #3
0
 def latest_runid(self):
     return CrawlerState.latest_runid(self)
Beispiel #4
0
 def runs(self):
     return CrawlerState.runs(self)
Beispiel #5
0
 def op_count(self):
     """Total operations performed for this crawler"""
     return CrawlerState.op_count(self)
Beispiel #6
0
def log_operation_start(context):
    crawler = context.crawler
    stage = context.stage
    run_id = context.run_id
    CrawlerState.record_operation_start(crawler, stage)
    CrawlerRun.record_operation_start(crawler, run_id)
Beispiel #7
0
def log_operation_end(context):
    crawler = context.crawler
    run_id = context.run_id
    CrawlerState.record_operation_end(crawler)
    CrawlerRun.record_operation_end(crawler, run_id)