From 4e74b16a41c848343bac4e0d2f5c98e16f463649 Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Wed, 13 Apr 2022 12:02:40 +0530 Subject: [PATCH] refactor: [BB-6077] allow setting celery backend in yml --- cms/envs/production.py | 4 ++-- lms/envs/production.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cms/envs/production.py b/cms/envs/production.py index 82244acbde..8a20a6ba12 100644 --- a/cms/envs/production.py +++ b/cms/envs/production.py @@ -110,8 +110,8 @@ EDX_PLATFORM_REVISION = REVISION_CONFIG.get('EDX_PLATFORM_REVISION', EDX_PLATFOR BROKER_POOL_LIMIT = 0 BROKER_CONNECTION_TIMEOUT = 1 -# For the Result Store, use the django cache named 'celery' -CELERY_RESULT_BACKEND = 'django-cache' +# Allow env to configure celery result backend with default set to django-cache +CELERY_RESULT_BACKEND = ENV_TOKENS.get('CELERY_RESULT_BACKEND', 'django-cache') # When the broker is behind an ELB, use a heartbeat to refresh the # connection and to detect if it has been dropped. diff --git a/lms/envs/production.py b/lms/envs/production.py index d989b1a48a..680c261a04 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -109,8 +109,8 @@ EDX_PLATFORM_REVISION = REVISION_CONFIG.get('EDX_PLATFORM_REVISION', EDX_PLATFOR BROKER_POOL_LIMIT = 0 BROKER_CONNECTION_TIMEOUT = 1 -# For the Result Store, use the django cache named 'celery' -CELERY_RESULT_BACKEND = 'django-cache' +# Allow env to configure celery result backend with default set to django-cache +CELERY_RESULT_BACKEND = ENV_TOKENS.get('CELERY_RESULT_BACKEND', 'django-cache') # When the broker is behind an ELB, use a heartbeat to refresh the # connection and to detect if it has been dropped.