From f37c7934f0707ac72db236eb8b76369ddedcba5d Mon Sep 17 00:00:00 2001 From: Adam Palay Date: Thu, 16 Apr 2015 15:41:16 -0400 Subject: [PATCH] reset queue reference in aws.py, use low priority queue (TNL-1591) (TNL-2003) --- lms/envs/aws.py | 6 +++++- lms/envs/common.py | 2 +- lms/envs/yaml_config.py | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 69ae6cf9d8..4fa99517d0 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -204,10 +204,14 @@ BULK_EMAIL_INFINITE_RETRY_CAP = ENV_TOKENS.get('BULK_EMAIL_INFINITE_RETRY_CAP', BULK_EMAIL_LOG_SENT_EMAILS = ENV_TOKENS.get('BULK_EMAIL_LOG_SENT_EMAILS', BULK_EMAIL_LOG_SENT_EMAILS) BULK_EMAIL_RETRY_DELAY_BETWEEN_SENDS = ENV_TOKENS.get('BULK_EMAIL_RETRY_DELAY_BETWEEN_SENDS', BULK_EMAIL_RETRY_DELAY_BETWEEN_SENDS) # We want Bulk Email running on the high-priority queue, so we define the -# routing key that points to it. At the moment, the name is the same. +# routing key that points to it. At the moment, the name is the same. # We have to reset the value here, since we have changed the value of the queue name. BULK_EMAIL_ROUTING_KEY = HIGH_PRIORITY_QUEUE +# We can run smaller jobs on the low priority queue. See note above for why +# we have to reset the value here. +BULK_EMAIL_ROUTING_KEY_SMALL_JOBS = LOW_PRIORITY_QUEUE + # Theme overrides THEME_NAME = ENV_TOKENS.get('THEME_NAME', None) diff --git a/lms/envs/common.py b/lms/envs/common.py index e50412f34a..714730b66a 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1524,7 +1524,7 @@ BULK_EMAIL_ROUTING_KEY = HIGH_PRIORITY_QUEUE # We also define a queue for smaller jobs so that large courses don't block # smaller emails (see BULK_EMAIL_JOB_SIZE_THRESHOLD setting) -BULK_EMAIL_ROUTING_KEY_SMALL_JOBS = DEFAULT_PRIORITY_QUEUE +BULK_EMAIL_ROUTING_KEY_SMALL_JOBS = LOW_PRIORITY_QUEUE # For emails with fewer than these number of recipients, send them through # a different queue to avoid large courses blocking emails that are meant to be diff --git a/lms/envs/yaml_config.py b/lms/envs/yaml_config.py index 0a1d120259..65a3a8090d 100644 --- a/lms/envs/yaml_config.py +++ b/lms/envs/yaml_config.py @@ -221,10 +221,14 @@ if 'loc_cache' not in CACHES: } # We want Bulk Email running on the high-priority queue, so we define the -# routing key that points to it. At the moment, the name is the same. +# routing key that points to it. At the moment, the name is the same. # We have to reset the value here, since we have changed the value of the queue name. BULK_EMAIL_ROUTING_KEY = HIGH_PRIORITY_QUEUE +# We can run smaller jobs on the low priority queue. See note above for why +# we have to reset the value here. +BULK_EMAIL_ROUTING_KEY_SMALL_JOBS = LOW_PRIORITY_QUEUE + LANGUAGE_DICT = dict(LANGUAGES) # Additional installed apps