fix(api): 爆款视频 API 用 celery_app.send_task() 替换直接 import worker #2105
Reference in New Issue
Block a user
Delete Branch "fix/2105-viral-video-celery-import"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
viral_video.py 有 4 处直接 from worker_app.tasks.viral_video import ... 然后 .delay(),API 容器无 worker_app 模块,任务提交时 ModuleNotFoundError。
修复
改用 celery_app.send_task() 字符串分发,task name 与 worker 侧 @shared_task(name=...) 对齐:
🚀 预览环境已部署
🗑️ 预览环境已清理
PR #2105 已关闭或合并,对应的预览环境已被清理。