🔧 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:
parent
358f5c9019
commit
3412e8a92c
1 changed files with 3 additions and 3 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue