feat: 调整日志
This commit is contained in:
parent
a168940b33
commit
ceee156e65
|
|
@ -253,7 +253,23 @@ def create_app():
|
||||||
app.state.task_nodes.pop(task_id, None)
|
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):
|
if next((x for x in shared.values() if x.get("err")), None):
|
||||||
work_log.status = DB.WorkLogsStatus.FAILED
|
work_log.status = DB.WorkLogsStatus.FAILED
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue