from celery import Celery
import os

celery_app = Celery(
    "worker",
    broker=os.getenv("REDIS_URL", "redis://redis:6379/0"),
    backend=os.getenv("REDIS_URL", "redis://redis:6379/0"),
)

celery_app.conf.task_routes = {
    "app.tasks.test_celery": "main-queue",
}

celery_app.autodiscover_tasks(["services.api.background_jobs"])
