diff --git a/backend/app/workers/tasks.py b/backend/app/workers/tasks.py index e17097f..c7f16ac 100644 --- a/backend/app/workers/tasks.py +++ b/backend/app/workers/tasks.py @@ -152,8 +152,9 @@ def run_generation_pipeline(self, task_id: int) -> dict: db.commit() except Exception: pass - _push_event_sync(task_id, workspace_id, "error", {"code": 50001, "message": str(exc)}, seq + 1) if exhausted: + # 彻底失败才推 error(前端弹 FatalErrorBanner);重试中不推,避免误报"生成失败"。 + _push_event_sync(task_id, workspace_id, "error", {"code": 50001, "message": str(exc)}, seq + 1) return {"task_id": task_id, "status": "failed", "error": str(exc)} raise self.retry(exc=exc) finally: