From 4be0ba10d2ed553807f16cffe5ae2c1db5f191e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=B8=85?= Date: Tue, 1 Sep 2026 23:13:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B6=E8=A1=8C=E6=89=A7=E8=A1=8C=E9=AA=8C?= =?UTF-8?q?=E6=94=B6=E7=88=AC=E8=99=AB=E4=B8=8E=E6=88=AA=E5=9B=BE=E4=B8=8B?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acceptance_service.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/acceptance_service.py b/acceptance_service.py index 9e0e5cb..8bbbbff 100644 --- a/acceptance_service.py +++ b/acceptance_service.py @@ -1396,6 +1396,11 @@ def _fetch_sources(public_id: str) -> None: with connection() as conn: conn.execute("UPDATE acceptance_tasks SET progress_percent=65,updated_at=? WHERE id=?", (now_iso(), task["id"])) if initial_analysis_future is not None: + # combined 任务的数据分析 Future 已经在运行;先下发截图,二者并行执行。 + if task["acceptance_method"] == "combined": + run_failures += _execute_acceptance_method( + task["id"], "screenshot", keywords, task["device_count"], + ) run_failures += initial_analysis_future.result() new_keywords = [keyword for keyword in keywords if keyword not in initial_keywords] if new_keywords: @@ -1403,10 +1408,6 @@ def _fetch_sources(public_id: str) -> None: task["id"], "data-analysis", new_keywords, task["cookie_count"] if task["acceptance_method"] == "combined" else task["device_count"], ) - if task["acceptance_method"] == "combined": - run_failures += _execute_acceptance_method( - task["id"], "screenshot", keywords, task["device_count"], - ) else: run_failures = _execute_acceptance_method( task["id"], task["acceptance_method"], keywords, task["device_count"]