From ceee156e65c14b7cebc328228fe8c95baa70ac56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A6=82=E5=A8=81?= Date: Tue, 23 Sep 2025 17:42:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/main.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/backend/app/main.py b/backend/app/main.py index 54804e0..70d63d7 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -253,7 +253,23 @@ def create_app(): app.state.task_nodes.pop(task_id, None) # 更新日志 - work_log.result = shared + work_log_result = [] + for x in nodes: + id = x.id + node_info = node_dict[id] + shared_info = shared.get(id) + status = "" + if shared_info and shared_info.get("err"): + status = "error" + elif shared_info: + status = "success" + work_log_result.append({ + "id": id, + "title": node_info.get("title", ""), + "result": shared.get(id, {}), + "status": status + }) + work_log.result = work_log_result if next((x for x in shared.values() if x.get("err")), None): work_log.status = DB.WorkLogsStatus.FAILED else: