爆款开头API开发完成

This commit is contained in:
2026-06-10 15:17:51 +08:00
parent 949bb794cc
commit 2923b1d6e1
16 changed files with 4034 additions and 0 deletions
@@ -0,0 +1,25 @@
from __future__ import annotations
from sqlalchemy.ext.asyncio import AsyncSession
from app.models.chat_generation_task import ChatGenerationTask
async def notify_chat_generation_task_finished(db: AsyncSession, task: ChatGenerationTask) -> None:
"""通知业务模块 ChatGenerationTask 已进入终态。
当前用于爆款开头复刻:
- image_generate 完成后自动进入 video_prompt_optimize
- video_generate 完成后总任务完成
"""
if not task:
return
if task.generation_mode == "hot_opening_replicate":
from app.services.hot_opening_replicate_service import (
handle_chat_generation_task_completed,
handle_chat_generation_task_failed,
)
if task.status == "completed":
await handle_chat_generation_task_completed(db, task)
elif task.status == "failed":
await handle_chat_generation_task_failed(db, task)