视频提词API超时600秒 | 错误信息重新捕获

This commit is contained in:
2026-07-24 16:12:41 +08:00
parent 663c4fa9db
commit 8325ae1f71
4 changed files with 11 additions and 11 deletions
@@ -1100,10 +1100,10 @@ async def run_image_prompt_optimize(
await db.commit()
return None
step.status = ModuleStepStatusEnum.FAILED.value
step.error_message = str(exc)
step.error_message = str(exc) if str(exc) else type(exc).__name__
step.completed_at = _now()
project.status = ModuleProjectStatusEnum.FAILED.value
project.error_message = f"图片 AI 提词生成失败: {exc}"
project.error_message = f"图片 AI 提词生成失败: {str(exc) if str(exc) else type(exc).__name__}"
log_module_prompt_event(
event_type="module_prompt_error",
project_id=project.id,
@@ -1581,10 +1581,10 @@ async def run_video_prompt_optimize(
await db.commit()
return None
step.status = ModuleStepStatusEnum.FAILED.value
step.error_message = str(exc)
step.error_message = str(exc) if str(exc) else type(exc).__name__
step.completed_at = _now()
project.status = ModuleProjectStatusEnum.FAILED.value
project.error_message = f"视频 AI 提词生成失败: {exc}"
project.error_message = f"视频 AI 提词生成失败: {str(exc) if str(exc) else type(exc).__name__}"
log_module_prompt_event(
event_type="module_prompt_error",
project_id=project.id,