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.voice_clone",
    "worker_app.tasks.tts_synthesis",
    "worker_app.tasks.edit_plan_generation",
    "worker_app.tasks.compose_video",
    "apps.worker.video_processing.dedup",
)
