From c71f4d4662d4c558b0a1eb2450b677dc5147d49d Mon Sep 17 00:00:00 2001 From: Brandon Squizzato Date: Wed, 21 Jun 2023 12:27:33 -0400 Subject: [PATCH] Add extra options as recommended in deprecation warnings --- backend/ibutsu_server/tasks/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/ibutsu_server/tasks/__init__.py b/backend/ibutsu_server/tasks/__init__.py index e7c75e22..4a0c3b3c 100644 --- a/backend/ibutsu_server/tasks/__init__.py +++ b/backend/ibutsu_server/tasks/__init__.py @@ -71,6 +71,9 @@ def on_failure(self, exc, task_id, args, kwargs, einfo): app = Celery( "ibutsu_server", broker=_app.config.get("CELERY_BROKER_URL"), + broker_connection_retry=True, + broker_connection_retry_on_startup=True, + worker_cancel_long_running_tasks_on_connection_loss=True, include=[ "ibutsu_server.tasks.db", "ibutsu_server.tasks.importers",