🔧 chore(celery_app.py): modify make_celery function signature to accept a config parameter

🔧 chore(celery_app.py): update celery_app.config_from_object argument to use the config parameter passed to make_celery function
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-09-22 10:47:35 -03:00
commit 3412e8a92c

View file

@ -1,11 +1,11 @@
from celery import Celery # type: ignore
def make_celery(app_name: str):
def make_celery(app_name: str, config: str):
celery_app = Celery(app_name)
celery_app.config_from_object("langflow.core.celeryconfig")
celery_app.config_from_object(config)
celery_app.conf.task_routes = {"langflow.worker.tasks.*": {"queue": "langflow"}}
return celery_app
celery_app = make_celery("langflow")
celery_app = make_celery("langflow", "langflow.core.celeryconfig")