auto-sync: 2026-05-17 13:06:33
This commit is contained in:
@@ -98,14 +98,13 @@ async def update_status(project_id: str, task_id: str, body: Dict[str, Any]):
|
||||
try:
|
||||
from src.api.sse_routes import get_broker
|
||||
broker = get_broker()
|
||||
broker.publish({
|
||||
"type": "task_updated",
|
||||
broker.publish_sync("task_updated", {
|
||||
"project_id": project_id,
|
||||
"task_id": task_id,
|
||||
"old_status": old_task.status if old_task else None,
|
||||
"new_status": body["status"],
|
||||
"agent": body.get("agent"),
|
||||
}, event_type="task_updated")
|
||||
})
|
||||
except Exception:
|
||||
pass # SSE 是可选的,不影响主流程
|
||||
return {"ok": True}
|
||||
|
||||
Reference in New Issue
Block a user