拆镜复刻、爆款开头复刻容灾优化

This commit is contained in:
2026-06-15 14:41:14 +08:00
parent 9e98c9c981
commit b6b4039f65
12 changed files with 987 additions and 70 deletions
+8 -2
View File
@@ -4,6 +4,10 @@ Celery autodiscover imports ``app.tasks``; importing task modules here ensures
custom named tasks are registered when workers start.
"""
import logging
logger = logging.getLogger("video_gen")
try:
from app.tasks import ( # noqa: F401
generation_create_tasks,
@@ -12,7 +16,9 @@ try:
generation_recovery_tasks,
hot_opening_replicate_tasks,
shot_replicate_tasks,
shot_replicate_flow_tasks
shot_replicate_flow_tasks,
module_async_recovery_tasks,
)
except Exception:
pass
logger.exception("Celery 任务模块导入失败,worker 可能出现 unregistered task。")
raise