Commit 20447bd8 by Cliff Dyer Committed by GitHub

Merge pull request #14965 from edx/neem/routing-key

Fix calling convention for celery options
parents 2b4817b1 8e409800
...@@ -106,10 +106,7 @@ class Command(BaseCommand): ...@@ -106,10 +106,7 @@ class Command(BaseCommand):
'batch_size': batch_size, 'batch_size': batch_size,
'estimate_first_attempted': options['estimate_first_attempted'] 'estimate_first_attempted': options['estimate_first_attempted']
} }
result = tasks.compute_grades_for_course_v2.apply_async( result = tasks.compute_grades_for_course_v2.apply_async(kwargs=kwargs, **task_options)
kwargs=kwargs,
options=task_options,
)
log.info("Grades: Created {task_name}[{task_id}] with arguments {kwargs}".format( log.info("Grades: Created {task_name}[{task_id}] with arguments {kwargs}".format(
task_name=tasks.compute_grades_for_course.name, task_name=tasks.compute_grades_for_course.name,
task_id=result.task_id, task_id=result.task_id,
......
...@@ -101,19 +101,19 @@ class TestComputeGrades(SharedModuleStoreTestCase): ...@@ -101,19 +101,19 @@ class TestComputeGrades(SharedModuleStoreTestCase):
mock_task.apply_async.call_args_list, mock_task.apply_async.call_args_list,
[ [
({ ({
'options': {'routing_key': 'key'}, 'routing_key': 'key',
'kwargs': _kwargs(self.course_keys[0], 0) 'kwargs': _kwargs(self.course_keys[0], 0)
},), },),
({ ({
'options': {'routing_key': 'key'}, 'routing_key': 'key',
'kwargs': _kwargs(self.course_keys[0], 2) 'kwargs': _kwargs(self.course_keys[0], 2)
},), },),
({ ({
'options': {'routing_key': 'key'}, 'routing_key': 'key',
'kwargs': _kwargs(self.course_keys[3], 0) 'kwargs': _kwargs(self.course_keys[3], 0)
},), },),
({ ({
'options': {'routing_key': 'key'}, 'routing_key': 'key',
'kwargs': _kwargs(self.course_keys[3], 2) 'kwargs': _kwargs(self.course_keys[3], 2)
},), },),
], ],
......
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