Files
xiaoxia-saas/apps/worker/worker_app/celery_app.py
T
CI Test 43366f290c
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 181h43m15s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 181h43m19s
Deploy / Deploy Staging (push) Failing after 181h59m26s
CI/CD Pipeline / Frontend Lint (push) Failing after 181h59m53s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 182h0m0s
feat: 实现任务2.10 JobService — 异步任务管理
- 新增 Job 领域模型(状态机、JobType/JobStatus 枚举)
- 新增 JobRepository 端口 + SQLAlchemy 实现
- 新增 10 个 Use Cases(CreateJob/Submit/Progress/Complete/Fail/Retry/Cancel/Get/List/Statistics)
- 新增 JobService 服务层,集成 VideoComposeService
- 新增 Pydantic schemas + RESTful API 路由
- 新增 Celery compose_video 任务(含进度追踪)
- 新增数据库迁移 018(jobs 表)
- 新增 44 个单元测试,全部通过
- 修复状态转换:允许 pending→success(快速完成场景)
2026-07-01 22:54:21 +08:00

19 lines
639 B
Python
Executable File

from celery import Celery
from worker_app.core.config import get_settings
settings = get_settings()
celery_app = Celery(settings.worker_name)
celery_app.conf.broker_url = settings.broker_url
celery_app.conf.result_backend = settings.result_backend
celery_app.conf.broker_connection_retry_on_startup = True
celery_app.conf.imports = (
"worker_app.tasks.health",
"worker_app.tasks.ingest",
"worker_app.tasks.classification",
"worker_app.tasks.generation",
"worker_app.tasks.voice_extraction",
"worker_app.tasks.edit_plan_generation",
"worker_app.tasks.compose_video",
"apps.worker.video_processing.dedup",
)