diff --git a/cms/envs/common.py b/cms/envs/common.py index 896f5c473f..f7ae6b5164 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -915,7 +915,6 @@ INSTALLED_APPS = ( # other apps that are. Django 1.8 wants to have imported models supported # by installed apps. 'lms.djangoapps.verify_student', - 'lms.djangoapps.grades.apps.GradesConfig', # Microsite configuration application 'microsite_configuration', diff --git a/lms/djangoapps/grades/tasks.py b/lms/djangoapps/grades/tasks.py index 22c067fb47..5cd8d476af 100644 --- a/lms/djangoapps/grades/tasks.py +++ b/lms/djangoapps/grades/tasks.py @@ -3,6 +3,7 @@ This module contains tasks for asynchronous execution of grade updates. """ from celery import task +from django.conf import settings from django.contrib.auth.models import User from lms.djangoapps.course_blocks.api import get_course_blocks @@ -16,7 +17,7 @@ from .transformer import GradesTransformer from .new.subsection_grade import SubsectionGradeFactory -@task() +@task(routing_key=settings.RECALCULATE_GRADES_ROUTING_KEY) def recalculate_subsection_grade(user_id, course_id, usage_id): """ Updates a saved subsection grade. diff --git a/lms/envs/aws.py b/lms/envs/aws.py index c2c03d425e..d817c21a9c 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -259,7 +259,10 @@ BULK_EMAIL_DEFAULT_RETRY_DELAY = ENV_TOKENS.get('BULK_EMAIL_DEFAULT_RETRY_DELAY' BULK_EMAIL_MAX_RETRIES = ENV_TOKENS.get('BULK_EMAIL_MAX_RETRIES', BULK_EMAIL_MAX_RETRIES) BULK_EMAIL_INFINITE_RETRY_CAP = ENV_TOKENS.get('BULK_EMAIL_INFINITE_RETRY_CAP', 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) +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. # We have to reset the value here, since we have changed the value of the queue name. @@ -269,6 +272,9 @@ BULK_EMAIL_ROUTING_KEY = HIGH_PRIORITY_QUEUE # we have to reset the value here. BULK_EMAIL_ROUTING_KEY_SMALL_JOBS = LOW_PRIORITY_QUEUE +# Queue to use for updating persistent grades +RECALCULATE_GRADES_ROUTING_KEY = ENV_TOKENS.get('RECALCULATE_GRADES_ROUTING_KEY', RECALCULATE_GRADES_ROUTING_KEY) + # following setting is for backward compatibility if ENV_TOKENS.get('COMPREHENSIVE_THEME_DIR', None): COMPREHENSIVE_THEME_DIR = ENV_TOKENS.get('COMPREHENSIVE_THEME_DIR') diff --git a/lms/envs/common.py b/lms/envs/common.py index c356863f74..4adfd7e9b2 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1852,6 +1852,11 @@ BULK_EMAIL_LOG_SENT_EMAILS = False # parallel, and what the SES rate is. BULK_EMAIL_RETRY_DELAY_BETWEEN_SENDS = 0.02 +############################# Persistent Grades #################################### + +# Queue to use for updating persistent grades +RECALCULATE_GRADES_ROUTING_KEY = LOW_PRIORITY_QUEUE + ############################# Email Opt In #################################### # Minimum age for organization-wide email opt in