From 9221e532c4b5b595b8733366b1dae93157aa7f6f Mon Sep 17 00:00:00 2001 From: terrtia Date: Tue, 12 Dec 2023 11:32:33 +0100 Subject: [PATCH] fix: [crawlers] fix task start --- bin/lib/crawlers.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/lib/crawlers.py b/bin/lib/crawlers.py index d6ec4f1e..13c8f75f 100755 --- a/bin/lib/crawlers.py +++ b/bin/lib/crawlers.py @@ -1793,11 +1793,12 @@ def api_add_crawler_capture(data, user_id): # parent = data.get('parent') # TODO parent - create_task(task['url'], depth=task['depth_limit'], har=task['har'], screenshot=task['screenshot'], - proxy=task['proxy'], tags=task['tags'], - parent='AIL_capture', task_uuid=task_uuid, external=True) - + task_uuid = create_task(task['url'], depth=task['depth_limit'], har=task['har'], screenshot=task['screenshot'], + proxy=task['proxy'], tags=task['tags'], + parent='manual', task_uuid=task_uuid, external=True) + task = CrawlerTask(task_uuid) create_capture(capture_uuid, task_uuid) + task.start() return {'uuid': capture_uuid}, 200 ###################################################################################