diff --git a/cms/envs/production.py b/cms/envs/production.py index aa254585e6..23da28ebf2 100644 --- a/cms/envs/production.py +++ b/cms/envs/production.py @@ -96,8 +96,8 @@ CELERY_RESULT_BACKEND = 'djcelery.backends.cache:CacheBackend' # When the broker is behind an ELB, use a heartbeat to refresh the # connection and to detect if it has been dropped. -BROKER_HEARTBEAT = 60.0 -BROKER_HEARTBEAT_CHECKRATE = 2 +BROKER_HEARTBEAT = ENV_TOKENS.get('BROKER_HEARTBEAT', 60.0) +BROKER_HEARTBEAT_CHECKRATE = ENV_TOKENS.get('BROKER_HEARTBEAT_CHECKRATE', 2) # Each worker should only fetch one message at a time CELERYD_PREFETCH_MULTIPLIER = 1 diff --git a/lms/envs/production.py b/lms/envs/production.py index fcff4a9b0b..2aa0bd07d0 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -108,8 +108,8 @@ CELERY_RESULT_BACKEND = 'djcelery.backends.cache:CacheBackend' # When the broker is behind an ELB, use a heartbeat to refresh the # connection and to detect if it has been dropped. -BROKER_HEARTBEAT = 60.0 -BROKER_HEARTBEAT_CHECKRATE = 2 +BROKER_HEARTBEAT = ENV_TOKENS.get('BROKER_HEARTBEAT', 60.0) +BROKER_HEARTBEAT_CHECKRATE = ENV_TOKENS.get('BROKER_HEARTBEAT_CHECKRATE', 2) # Each worker should only fetch one message at a time CELERYD_PREFETCH_MULTIPLIER = 1