fix: clear claimed_by when setting state=review (PM poller requires NULL)
This commit is contained in:
parent
14471372c9
commit
926bc5623f
@ -372,9 +372,9 @@ async def role_agent_run(project_id: str, role: str, agent_id: str = None, model
|
|||||||
"created_by": agent_id or role,
|
"created_by": agent_id or role,
|
||||||
})
|
})
|
||||||
|
|
||||||
# 置为 review 状态,等待PM审核
|
# 置为 review 状态,等待PM审核(清除 claimed_by 让 PM poller 能认领)
|
||||||
await sor.sqlExe(
|
await sor.sqlExe(
|
||||||
"UPDATE pipeline_tasks SET state=${st}$ WHERE id=${tid}$",
|
"UPDATE pipeline_tasks SET state=${st}$, claimed_by=NULL WHERE id=${tid}$",
|
||||||
{"st": TASK_REVIEW, "tid": task_id})
|
{"st": TASK_REVIEW, "tid": task_id})
|
||||||
logger.info(f"role_agent_run completed(review): task={task_id} role={role} deliverable={did} file={file_path}")
|
logger.info(f"role_agent_run completed(review): task={task_id} role={role} deliverable={did} file={file_path}")
|
||||||
return {"status": "completed", "task_id": task_id, "deliverable_id": did,
|
return {"status": "completed", "task_id": task_id, "deliverable_id": did,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user