mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 00:28:22 +00:00
fix: [crawlers] fix errored capture queue
This commit is contained in:
parent
fbd7e2236a
commit
d1608e89e1
1 changed files with 6 additions and 0 deletions
|
@ -142,6 +142,12 @@ class Crawler(AbstractModule):
|
||||||
return capture
|
return capture
|
||||||
elif status == crawlers.CaptureStatus.UNKNOWN:
|
elif status == crawlers.CaptureStatus.UNKNOWN:
|
||||||
capture_start = capture.get_start_time(r_str=False)
|
capture_start = capture.get_start_time(r_str=False)
|
||||||
|
if capture_start == 0:
|
||||||
|
task = capture.get_task()
|
||||||
|
task.delete()
|
||||||
|
capture.delete()
|
||||||
|
self.logger.warning(f'capture UNKNOWN ERROR STATE, {task.uuid} Removed from queue')
|
||||||
|
return None
|
||||||
if int(time.time()) - capture_start > 600: # TODO ADD in new crawler config
|
if int(time.time()) - capture_start > 600: # TODO ADD in new crawler config
|
||||||
task = capture.get_task()
|
task = capture.get_task()
|
||||||
task.reset()
|
task.reset()
|
||||||
|
|
Loading…
Reference in a new issue