F4: verify task recovery and document Prompt background jobs

This commit is contained in:
Xin Wang
2026-10-23 16:27:00 +08:00
parent 9a4d48a86e
commit 8ac75a1873
14 changed files with 654 additions and 46 deletions
+10
View File
@@ -66,3 +66,13 @@ async def send_input(task_id: str, body: TaskInput):
raise HTTPException(400, str(exc)) from exc
except Exception as exc:
raise HTTPException(502, "远端暂未接受回复,请稍后重试") from exc
@router.post("/{task_id}/refresh")
async def refresh_task(task_id: str):
try:
return await task_service.reconcile(task_id)
except ValueError as exc:
raise HTTPException(404, str(exc)) from exc
except Exception as exc:
raise HTTPException(502, "暂时无法核查远端状态") from exc