mirror of
https://github.com/ail-project/ail-framework.git
synced 2025-01-18 16:36:13 +00:00
fix: [crawler] fix reload_crawlers_stats queues stats
This commit is contained in:
parent
5b5ee502d0
commit
3faea7997c
1 changed files with 8 additions and 2 deletions
|
@ -1101,8 +1101,14 @@ def reload_crawlers_stats():
|
|||
tasks = r_crawler.smembers(f'crawler:queue:type:{domain_type}')
|
||||
for task_uuid in tasks:
|
||||
task = CrawlerTask(task_uuid)
|
||||
if not task.is_in_queue() and task.get_status() is None and not task.get_capture():
|
||||
task.delete()
|
||||
if not task.is_in_queue() and task.get_status() is None:
|
||||
capture = task.get_capture()
|
||||
if capture:
|
||||
c = CrawlerCapture(capture)
|
||||
if not c.exists():
|
||||
task.delete()
|
||||
else:
|
||||
task.delete()
|
||||
|
||||
#### Blocklist ####
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue