Merge pull request #13757 from edx/efischer/low_queue
Route grading updates to low priority queue
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user