from celery import Celery from app.core.config import settings celery_app = Celery( "fastapi_celery_example", broker=settings.celery_broker_url, backend=settings.celery_result_backend, include=["app.tasks.tasks"], ) # Optional configuration celery_app.conf.update( task_serializer="json", accept_content=["json"], result_serializer="json", timezone="UTC", enable_utc=True, )