mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
16 lines
474 B
Python
16 lines
474 B
Python
from celery import Celery
|
|
from application.core.settings import settings
|
|
from celery.signals import setup_logging
|
|
|
|
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
|
|
|
|
@setup_logging.connect
|
|
def config_loggers(*args, **kwargs):
|
|
from application.core.logging_config import setup_logging
|
|
setup_logging()
|
|
|
|
celery = make_celery()
|