feat: D2核验通过后自动恢复verify_failed任务为approved+自动关闭output_verify待办
This commit is contained in:
parent
fdd98266f8
commit
9a1acf792d
@ -777,6 +777,20 @@ async def reconcile_project(sor, project_id, project_name=""):
|
||||
assignee_role="owner.superuser")
|
||||
await sor.sqlExe("COMMIT", {})
|
||||
acts.append("escalated: 产出落库核验不通过(%d 个任务标 verify_failed),抛人工" % len(verify_bad))
|
||||
else:
|
||||
# 2026-09-03:核验全通过且有待处理的 output_verify → 自动关闭(问题已解决);
|
||||
# 之前标 verify_failed 的人工修正任务,落库后恢复 approved(状态与事实一致)
|
||||
await sor.sqlExe(
|
||||
"UPDATE pipeline_tasks SET state='approved', updated_at=NOW() "
|
||||
"WHERE tenant_id=${p}$ AND role=${r}$ AND state='verify_failed'",
|
||||
{"p": project_id, "r": R_ANALYST})
|
||||
ht = await find_human_task(sor, project_id, "output_verify", status="pending")
|
||||
if ht:
|
||||
await sor.sqlExe(
|
||||
"UPDATE pipeline_human_tasks SET status='done', updated_at=NOW() "
|
||||
"WHERE id=${h}$", {"h": ht.get("id")})
|
||||
acts.append("auto-closed: output_verify 待办(落库核验已通过)")
|
||||
await sor.sqlExe("COMMIT", {})
|
||||
|
||||
if created_w or created_r:
|
||||
return acts
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user