You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fastapi_celery/project/celery_utils.py

12 lines
271 B
Python

from celery import current_app as celery_current_app
from project.config import settings
def create_celery():
"""Clerey factory function."""
celery_app = celery_current_app
celery_app.config_from_object(settings, namespace="CELERY")
return celery_app