auto-sync: 2026-06-03 18:28:44 (catch-all)
This commit is contained in:
@@ -81,6 +81,18 @@ def approve_checkpoint(project_id: str, task_id: str, checkpoint_id: str, req: R
|
||||
raise HTTPException(status_code=404, detail="Checkpoint not found")
|
||||
if "error" in result:
|
||||
raise HTTPException(status_code=400, detail=result["error"])
|
||||
# #10: SSE 通知前端 checkpoint 已处理
|
||||
try:
|
||||
from src.api.sse_routes import get_broker
|
||||
broker = get_broker()
|
||||
broker.publish_sync("checkpoint_resolved", {
|
||||
"project_id": project_id,
|
||||
"task_id": task_id,
|
||||
"checkpoint_id": checkpoint_id,
|
||||
"action": "approve",
|
||||
})
|
||||
except Exception:
|
||||
pass
|
||||
return {"ok": True, **result}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user