From 8325ae1f71cda2c2b29c7c50ce92b70e40c89f00 Mon Sep 17 00:00:00 2001 From: GinHa <15201596918@163.com> Date: Fri, 24 Jul 2026 16:12:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=8F=90=E8=AF=8DAPI?= =?UTF-8?q?=E8=B6=85=E6=97=B6600=E7=A7=92=20|=20=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=87=8D=E6=96=B0=E6=8D=95=E8=8E=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- video-gen-api/app/config.py | 2 +- .../app/services/hot_opening_replicate_service.py | 8 ++++---- .../app/services/module_generation_v2/flow_service.py | 4 ++-- video-gen-api/app/services/shot_replicate_flow_service.py | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/video-gen-api/app/config.py b/video-gen-api/app/config.py index 7b7600e2..eb2eb956 100644 --- a/video-gen-api/app/config.py +++ b/video-gen-api/app/config.py @@ -170,7 +170,7 @@ class Settings(BaseSettings): CELERY_RUNTIME_GC_INTERVAL_SECONDS: int = 600 CELERY_RUNTIME_GC_BATCH_SIZE: int = 500 - CHATAPI_REQUEST_TIMEOUT_SECONDS: int = 180 + CHATAPI_REQUEST_TIMEOUT_SECONDS: int = 600 CHATAPI_VIDEO_FPS: float = 0.5 CHATAPI_ASYNC_MAX_RETRIES: int = 3 CHATAPI_ASYNC_RETRY_BACKOFF_SECONDS: int = 30 diff --git a/video-gen-api/app/services/hot_opening_replicate_service.py b/video-gen-api/app/services/hot_opening_replicate_service.py index b8476710..c4b6096a 100644 --- a/video-gen-api/app/services/hot_opening_replicate_service.py +++ b/video-gen-api/app/services/hot_opening_replicate_service.py @@ -1152,10 +1152,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, @@ -1623,10 +1623,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, diff --git a/video-gen-api/app/services/module_generation_v2/flow_service.py b/video-gen-api/app/services/module_generation_v2/flow_service.py index ed5d7d86..0be13454 100644 --- a/video-gen-api/app/services/module_generation_v2/flow_service.py +++ b/video-gen-api/app/services/module_generation_v2/flow_service.py @@ -1066,10 +1066,10 @@ async def run_video_prompt_optimize_v2( project, step = row if step.status == ModuleStepStatusEnum.PROCESSING.value: 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 = utc_now() project.status = ModuleProjectStatusEnum.FAILED.value - project.error_message = str(exc) + project.error_message = str(exc) if str(exc) else type(exc).__name__ # provider 已成功时 settle_success 已在当前事务写入 RELEASE/CHARGE; # 即使业务步骤已不存在或已不是 processing,也必须提交账务结算。 await db.commit() diff --git a/video-gen-api/app/services/shot_replicate_flow_service.py b/video-gen-api/app/services/shot_replicate_flow_service.py index 8ac13c50..6e750e68 100644 --- a/video-gen-api/app/services/shot_replicate_flow_service.py +++ b/video-gen-api/app/services/shot_replicate_flow_service.py @@ -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,