Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
- Celery 异步任务:任务提交后后端持续轮询火山 API 直到拿到终态,用户关浏览器也不会丢视频 - 渐进式轮询:前2分钟每5秒、2-10分钟每15秒、10分钟后每30秒 - 优雅降级:无 Redis 时静默跳过,不影响现有前端轮询 - K8s:新增 Redis Deployment + Service、Celery Worker Deployment - CI/CD:deploy.yaml 自动部署 Redis/Celery,每次推代码自动重启 celery worker - 兜底:poll_stuck_tasks management command 清理僵尸任务 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
13 lines
338 B
Python
13 lines
338 B
Python
try:
|
|
import pymysql
|
|
pymysql.install_as_MySQLdb()
|
|
except ImportError:
|
|
pass # Docker uses mysqlclient natively
|
|
|
|
# Celery app — import so that @shared_task uses this app
|
|
try:
|
|
from .celery import app as celery_app
|
|
__all__ = ('celery_app',)
|
|
except ImportError:
|
|
pass # celery not installed (local dev without redis)
|