b41e0255ef
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 188h23m27s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 188h23m31s
Deploy / Deploy Staging (push) Failing after 188h23m54s
CI/CD Pipeline / Frontend Lint (push) Failing after 188h24m18s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 188h24m24s
- POST /edit-plans/{id}/generate: 触发剪辑渲染生成
- 验证 editing 状态 + 片段存在
- pending 片段标记为 ready
- 创建 GenerationTask 并调度 Celery 任务
- 计划状态流转为 rendering
- GET /edit-plans/{id}/generation-status: 查询生成进度
- 返回计划状态、GenerationTask ID、各片段状态
- Celery 任务 worker.render_edit_plan:
- 下载素材 → FFmpeg concat 拼接 → 上传 OSS
- 更新 EditPlan/EditPlanClip/GenerationTask 状态
- 失败重试(max_retries=2, countdown=60s)
- 16 个单元测试全部通过
18 lines
601 B
Python
18 lines
601 B
Python
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",
|
|
"apps.worker.video_processing.dedup",
|
|
)
|