From 77105001e066fb7ab16e20526d180337d49c340d Mon Sep 17 00:00:00 2001 From: Florent Chehab Date: Tue, 10 Mar 2026 11:45:32 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(settings)=20configure=20celery=20&=20?= =?UTF-8?q?run=20task=20in=20dedicated=20queue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improve celery configuration from env variables and set meet backend related tasks to run in the `meet-backend` queue to ease sharing a single redis instance for multiple celery. --- src/backend/meet/settings.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/backend/meet/settings.py b/src/backend/meet/settings.py index 5a76273f..fdfdfdaa 100755 --- a/src/backend/meet/settings.py +++ b/src/backend/meet/settings.py @@ -437,9 +437,11 @@ class Base(Configuration): # Celery # Defaults to False to avoid breaking change, async task will be run # synchronously - CELERY_ENABLED = values.BooleanValue(False) - CELERY_BROKER_URL = values.Value("redis://redis:6379/0") - CELERY_BROKER_TRANSPORT_OPTIONS = values.DictValue({}) + CELERY_ENABLED = values.BooleanValue(False, environ_prefix=None) + CELERY_TASK_ALWAYS_EAGER = values.BooleanValue(False, environ_prefix=None) + CELERY_TASK_DEFAULT_QUEUE = values.Value("meet-backend", environ_prefix=None) + CELERY_BROKER_URL = values.Value("redis://redis:6379/0", environ_prefix=None) + CELERY_BROKER_TRANSPORT_OPTIONS = values.DictValue({}, environ_prefix=None) # Session SESSION_ENGINE = "django.contrib.sessions.backends.cache" @@ -970,7 +972,7 @@ class Test(Base): APPLICATION_JWT_SECRET_KEY = "devKey" # noqa:S105 APPLICATION_JWT_AUDIENCE = "Test inc." - CELERY_TASK_ALWAYS_EAGER = values.BooleanValue(True) + CELERY_TASK_ALWAYS_EAGER = True def __init__(self): # pylint: disable=invalid-name