mirror of
https://github.com/ail-project/ail-framework.git
synced 2025-01-18 08:26:15 +00:00
fix: [crawler] timeout QUEUED captures
This commit is contained in:
parent
109ce56a4a
commit
df161cfd64
1 changed files with 8 additions and 1 deletions
|
@ -179,7 +179,14 @@ class Crawler(AbstractModule):
|
|||
else:
|
||||
capture.update(status)
|
||||
elif status == crawlers.CaptureStatus.QUEUED:
|
||||
capture.update(status)
|
||||
capture_start = capture.get_start_time(r_str=False)
|
||||
if int(time.time()) - capture_start > 600: # TODO ADD in new crawler config
|
||||
task = capture.get_task()
|
||||
task.reset()
|
||||
capture.delete()
|
||||
self.logger.warning(f'capture QUEUED Timeout, {task.uuid} Send back in queue')
|
||||
else:
|
||||
capture.update(status)
|
||||
print(capture.uuid, crawlers.CaptureStatus(status).name, int(time.time()))
|
||||
elif status == crawlers.CaptureStatus.ONGOING:
|
||||
capture.update(status)
|
||||
|
|
Loading…
Add table
Reference in a new issue