diff --git a/cms/envs/production.py b/cms/envs/production.py index 73bd38c58888..ef5353a9fb41 100644 --- a/cms/envs/production.py +++ b/cms/envs/production.py @@ -409,10 +409,14 @@ def get_env_setting(setting): CELERY_BROKER_VHOST) BROKER_USE_SSL = ENV_TOKENS.get('CELERY_BROKER_USE_SSL', False) -BROKER_TRANSPORT_OPTIONS = { - 'fanout_patterns': True, - 'fanout_prefix': True, -} +try: + BROKER_TRANSPORT_OPTIONS = { + 'fanout_patterns': True, + 'fanout_prefix': True, + **ENV_TOKENS.get('CELERY_BROKER_TRANSPORT_OPTIONS', {}) + } +except TypeError as exc: + raise ImproperlyConfigured('CELERY_BROKER_TRANSPORT_OPTIONS must be a dict') from exc # Message expiry time in seconds CELERY_EVENT_QUEUE_TTL = ENV_TOKENS.get('CELERY_EVENT_QUEUE_TTL', None) diff --git a/lms/envs/production.py b/lms/envs/production.py index 96c5acfdd669..d9f6515da425 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -545,10 +545,14 @@ def get_env_setting(setting): CELERY_BROKER_VHOST) BROKER_USE_SSL = ENV_TOKENS.get('CELERY_BROKER_USE_SSL', False) -BROKER_TRANSPORT_OPTIONS = { - 'fanout_patterns': True, - 'fanout_prefix': True, -} +try: + BROKER_TRANSPORT_OPTIONS = { + 'fanout_patterns': True, + 'fanout_prefix': True, + **ENV_TOKENS.get('CELERY_BROKER_TRANSPORT_OPTIONS', {}) + } +except TypeError as exc: + raise ImproperlyConfigured('CELERY_BROKER_TRANSPORT_OPTIONS must be a dict') from exc # Block Structures