4 Commits

Author SHA1 Message Date
zyc
43228d255e fix celery 2026-04-04 10:15:23 +08:00
seaislee1209
7a358ea9ef fix: v0.14.3 GenerationRecord 加 updated_at + 轮询改固定5秒
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m25s
- GenerationRecord 加 updated_at 字段(之前只在 QuotaConfig 上,Celery 查 GenerationRecord 报 FieldError)
- 后端轮询间隔从渐进式(5s→15s→30s)改为全程固定 5 秒(RPM 12000 足够,400 并发仅用 40%)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:33:29 +08:00
zyc
6853b08fc9 refactor: 切换 Celery broker 为火山引擎 Redis + 僵尸任务自动恢复
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m16s
- Redis 从阿里云切换到火山引擎(同区域低延迟)
- delay() 失败改为 warning 日志 + 重试一次(不再静默吞异常)
- 新增 recover_stuck_tasks 定时任务,每10分钟扫描卡住的任务重新派发
- 轮询时每次 touch updated_at,防止活跃任务被误判为僵尸
- Celery worker 启用内嵌 Beat 调度器(-B 参数)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:26:04 +08:00
seaislee1209
60713ea009 feat: v0.14.0 后端异步轮询(Celery + Redis)
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>
2026-03-25 13:27:16 +08:00