rename celery_init.py

This commit is contained in:
xucai
2024-06-12 19:48:28 +08:00
parent 3df745d1d2
commit ae2ded119f
5 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,9 @@
from celery import Celery
from application.core.settings import settings
def make_celery(app_name=__name__):
celery = Celery(app_name, broker=settings.CELERY_BROKER_URL, backend=settings.CELERY_RESULT_BACKEND)
celery.conf.update(settings)
return celery
celery = make_celery()