Fix missing result_backend on Debian 10/11
For whatever reason, a Celery worker on <5.2.x was not picking these up. Move them back to the root of the module so they are properly picked up on these older versions but still prevents calling the routing functions during an API doc generation.
This commit is contained in:
@ -141,11 +141,15 @@ celery = Celery(
|
||||
result_backend=celery_task_uri,
|
||||
result_extended=True,
|
||||
)
|
||||
app.config["broker_url"] = celery_task_uri
|
||||
app.config["result_backend"] = celery_task_uri
|
||||
celery.conf.update(app.config)
|
||||
|
||||
|
||||
def celery_startup():
|
||||
app.config["CELERY_broker_url"] = celery_task_uri
|
||||
app.config["result_backend"] = celery_task_uri
|
||||
"""
|
||||
Runs when the API daemon starts, but not the Celery workers or the API doc generator
|
||||
"""
|
||||
app.config["task_queues"] = tuple(
|
||||
[Queue(h, routing_key=f"{h}.#") for h in get_all_nodes()]
|
||||
)
|
||||
|
Reference in New Issue
Block a user