Commit b8a02534 by Eric Fischer Committed by GitHub

Merge pull request #13757 from edx/efischer/low_queue

Route grading updates to low priority queue
parents 8772df04 c4c28752
...@@ -915,7 +915,6 @@ INSTALLED_APPS = ( ...@@ -915,7 +915,6 @@ INSTALLED_APPS = (
# other apps that are. Django 1.8 wants to have imported models supported # other apps that are. Django 1.8 wants to have imported models supported
# by installed apps. # by installed apps.
'lms.djangoapps.verify_student', 'lms.djangoapps.verify_student',
'lms.djangoapps.grades.apps.GradesConfig',
# Microsite configuration application # Microsite configuration application
'microsite_configuration', 'microsite_configuration',
......
...@@ -3,6 +3,7 @@ This module contains tasks for asynchronous execution of grade updates. ...@@ -3,6 +3,7 @@ This module contains tasks for asynchronous execution of grade updates.
""" """
from celery import task from celery import task
from django.conf import settings
from django.contrib.auth.models import User from django.contrib.auth.models import User
from lms.djangoapps.course_blocks.api import get_course_blocks from lms.djangoapps.course_blocks.api import get_course_blocks
...@@ -16,7 +17,7 @@ from .transformer import GradesTransformer ...@@ -16,7 +17,7 @@ from .transformer import GradesTransformer
from .new.subsection_grade import SubsectionGradeFactory 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): def recalculate_subsection_grade(user_id, course_id, usage_id):
""" """
Updates a saved subsection grade. Updates a saved subsection grade.
......
...@@ -259,7 +259,10 @@ BULK_EMAIL_DEFAULT_RETRY_DELAY = ENV_TOKENS.get('BULK_EMAIL_DEFAULT_RETRY_DELAY' ...@@ -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_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_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_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 # 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. # 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 ...@@ -269,6 +272,9 @@ BULK_EMAIL_ROUTING_KEY = HIGH_PRIORITY_QUEUE
# we have to reset the value here. # we have to reset the value here.
BULK_EMAIL_ROUTING_KEY_SMALL_JOBS = LOW_PRIORITY_QUEUE 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 # following setting is for backward compatibility
if ENV_TOKENS.get('COMPREHENSIVE_THEME_DIR', None): if ENV_TOKENS.get('COMPREHENSIVE_THEME_DIR', None):
COMPREHENSIVE_THEME_DIR = ENV_TOKENS.get('COMPREHENSIVE_THEME_DIR') COMPREHENSIVE_THEME_DIR = ENV_TOKENS.get('COMPREHENSIVE_THEME_DIR')
......
...@@ -1852,6 +1852,11 @@ BULK_EMAIL_LOG_SENT_EMAILS = False ...@@ -1852,6 +1852,11 @@ BULK_EMAIL_LOG_SENT_EMAILS = False
# parallel, and what the SES rate is. # parallel, and what the SES rate is.
BULK_EMAIL_RETRY_DELAY_BETWEEN_SENDS = 0.02 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 #################################### ############################# Email Opt In ####################################
# Minimum age for organization-wide email opt in # Minimum age for organization-wide email opt in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment