From fade1fb3f1e3405b7f2e4bf07473f554d6c5aef7 Mon Sep 17 00:00:00 2001 From: "Albert St. Aubin" Date: Thu, 10 May 2018 07:23:13 -0400 Subject: [PATCH] Correction for incorrect conditional error logic and wrong channel [LEARNER-5123] --- lms/djangoapps/grades/tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/grades/tasks.py b/lms/djangoapps/grades/tasks.py index fee3f75d10..3d542a854a 100644 --- a/lms/djangoapps/grades/tasks.py +++ b/lms/djangoapps/grades/tasks.py @@ -120,7 +120,7 @@ def compute_grades_for_course(course_key, offset, batch_size, **kwargs): # pyli time_limit=SUBSECTION_GRADE_TIMEOUT_SECONDS, max_retries=2, default_retry_delay=RETRY_DELAY_SECONDS, - routing_key=settings.RECALCULATE_GRADES_ROUTING_KEY + routing_key=settings.POLICY_CHANGE_GRADES_ROUTING_KEY ) def recalculate_course_and_subsection_grades_for_user(self, **kwargs): # pylint: disable=unused-argument """ @@ -130,9 +130,9 @@ def recalculate_course_and_subsection_grades_for_user(self, **kwargs): # pylint user_id = kwargs.get('user_id') course_key_str = kwargs.get('course_key') - if not user_id or course_key_str: + if not (user_id or course_key_str): message = 'recalculate_course_and_subsection_grades_for_user missing "user" or "course_key" kwargs from {}' - log.error(message.format(kwargs)) + raise Exception(message.format(kwargs)) user = User.objects.get(id=user_id) course_key = CourseKey.from_string(course_key_str)