From d1608e89e13a4a1df8e83f2c87d941de3147a5f3 Mon Sep 17 00:00:00 2001 From: terrtia Date: Tue, 30 Jan 2024 11:29:42 +0100 Subject: [PATCH] fix: [crawlers] fix errored capture queue --- bin/crawlers/Crawler.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/crawlers/Crawler.py b/bin/crawlers/Crawler.py index c1ba0e0c..b1a7d7cd 100755 --- a/bin/crawlers/Crawler.py +++ b/bin/crawlers/Crawler.py @@ -142,6 +142,12 @@ class Crawler(AbstractModule): 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()