爆款开头复刻/拆镜复刻追加日志|拆镜复刻追加视频AI分析API

This commit is contained in:
2026-07-07 19:52:12 +08:00
parent 35ffa317e7
commit 2d419b171e
16 changed files with 1153 additions and 91 deletions
@@ -10,7 +10,7 @@ from sqlalchemy.ext.asyncio import AsyncSession
from app.dependencies import get_current_user, get_db
from app.models.user import User
from app.enums.common import ModuleProjectStatusEnum
from app.enums.hot_opening_replicate import HotOpeningStepCodeEnum, ModuleCodeEnum
from app.enums.hot_opening_replicate import HotOpeningLogEventEnum, HotOpeningStepCodeEnum, ModuleCodeEnum
from app.schemas.hot_opening_replicate import (
HotOpeningActionOut,
HotOpeningDeleteOut,
@@ -125,7 +125,7 @@ def _log_api_exception_from_locals(exc: BaseException, local_values: dict, messa
req = local_values.get("req")
detail = {"request": req.model_dump() if hasattr(req, "model_dump") else str(req) if req is not None else None}
_log_api_error(
event_type="API_REQUEST_FAILED",
event_type=HotOpeningLogEventEnum.API_REQUEST_FAILED.value,
current_user=current_user if isinstance(current_user, User) else None,
project_id=str(project_id) if project_id else None,
step_id=str(step_id) if step_id else None,
@@ -172,7 +172,7 @@ async def _mark_dispatch_failed_and_raise(
except Exception as exc:
await db.rollback()
_log_api_error(
event_type="CELERY_DISPATCH_MARK_FAILED",
event_type=HotOpeningLogEventEnum.CELERY_DISPATCH_MARK_FAILED.value,
current_user=current_user,
project_id=project_id,
step_id=step_id,
@@ -182,7 +182,7 @@ async def _mark_dispatch_failed_and_raise(
)
log_module_error(
module=MODULE,
event_type="CELERY_DISPATCH_FAILED",
event_type=HotOpeningLogEventEnum.CELERY_DISPATCH_FAILED.value,
project_id=project_id,
step_id=step_id,
user_id=_safe_user_id(current_user),
@@ -439,7 +439,7 @@ async def generate_image_prompt(
_ = req
if celery_app is None:
_log_api_error(
event_type="CELERY_DISABLED",
event_type=HotOpeningLogEventEnum.CELERY_DISABLED.value,
current_user=current_user,
project_id=project_id,
step_id=step_id,
@@ -509,7 +509,7 @@ async def generate_image(
):
if celery_app is None:
_log_api_error(
event_type="CELERY_DISABLED",
event_type=HotOpeningLogEventEnum.CELERY_DISABLED.value,
current_user=current_user,
project_id=project_id,
step_id=step_id,
@@ -575,7 +575,7 @@ async def generate_video_prompt(
):
if celery_app is None:
_log_api_error(
event_type="CELERY_DISABLED",
event_type=HotOpeningLogEventEnum.CELERY_DISABLED.value,
current_user=current_user,
project_id=project_id,
step_id=step_id,
@@ -646,7 +646,7 @@ async def generate_video(
):
if celery_app is None:
_log_api_error(
event_type="CELERY_DISABLED",
event_type=HotOpeningLogEventEnum.CELERY_DISABLED.value,
current_user=current_user,
project_id=project_id,
step_id=step_id,