Skip to content

Commit

Permalink
fix: [crawlers] fix errored capture queue
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Jan 30, 2024
1 parent fbd7e22 commit d1608e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/crawlers/Crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ def get_message(self):
return capture
elif status == crawlers.CaptureStatus.UNKNOWN:
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
task = capture.get_task()
task.reset()
Expand Down

0 comments on commit d1608e8

Please sign in to comment.