视频提词API超时600秒 | 错误信息重新捕获
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user