From 8a310b8a78a7a8afe5da17ef91379cb90c5b6075 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Fri, 18 Sep 2026 21:11:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(gpu):=20result=E6=8E=A5=E5=8F=A3=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E4=B8=8D=E5=AD=98=E5=9C=A8task=E8=BF=94=E5=9B=9E404?= =?UTF-8?q?=E8=80=8C=E9=9D=9E500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/api/app/api/routes/gpu_lipsync.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/api/app/api/routes/gpu_lipsync.py b/apps/api/app/api/routes/gpu_lipsync.py index db3a83821..da1b8385f 100644 --- a/apps/api/app/api/routes/gpu_lipsync.py +++ b/apps/api/app/api/routes/gpu_lipsync.py @@ -184,13 +184,16 @@ async def report_result( pass # 其他情况:success=true 且无文件 → Worker 已自行 PUT 到预签名 URL,直接标记完成 - task = svc.report_result( - task_id=task_id, - worker_id=worker_id, - success=success, - duration_seconds=duration_seconds, - error_msg=error_msg, - ) + try: + task = svc.report_result( + task_id=task_id, + worker_id=worker_id, + success=success, + duration_seconds=duration_seconds, + error_msg=error_msg, + ) + except KeyError as exc: + raise HTTPException(status_code=404, detail=str(exc)) from exc return GpuLipsyncResultResponse( ok=True, task_id=task.id,