feat: Add management command for processing scheduled instructor tasks
[MICROBA-1512] * Adds a new management command to the `instructor_task` app that will be used to process scheduled tasks ready for execution by Celery.
This commit is contained in:
@@ -28,7 +28,7 @@ from lms.djangoapps.instructor_task.api import (
|
||||
generate_certificates_for_students,
|
||||
get_instructor_task_history,
|
||||
get_running_instructor_tasks,
|
||||
process_scheduled_tasks,
|
||||
process_scheduled_instructor_tasks,
|
||||
regenerate_certificates,
|
||||
submit_bulk_course_email,
|
||||
submit_calculate_may_enroll_csv,
|
||||
@@ -508,7 +508,7 @@ class InstructorTaskCourseSubmitTest(TestReportMixin, InstructorTaskCourseTestCa
|
||||
]
|
||||
|
||||
with LogCapture() as log:
|
||||
process_scheduled_tasks()
|
||||
process_scheduled_instructor_tasks()
|
||||
|
||||
mock_submit_scheduled_task.assert_called_once_with(due_instructor_task_schedule)
|
||||
log.check_present((LOG_PATH, "INFO", expected_messages[0]),)
|
||||
@@ -528,7 +528,7 @@ class InstructorTaskCourseSubmitTest(TestReportMixin, InstructorTaskCourseTestCa
|
||||
]
|
||||
|
||||
with LogCapture() as log:
|
||||
process_scheduled_tasks()
|
||||
process_scheduled_instructor_tasks()
|
||||
|
||||
log.check_present((LOG_PATH, "ERROR", expected_messages[0]),)
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ class ScheduledInstructorTaskSubmissionTests(InstructorTaskCourseTestCase):
|
||||
expected_task_arguments = json.loads(schedule.task_args)
|
||||
expected_task_args = [schedule.task.id, expected_task_arguments]
|
||||
expected_messages = [
|
||||
f"Submitting scheduled task {schedule.task.id} for processing",
|
||||
f"Submitting scheduled task '{schedule.task.id}' for processing",
|
||||
]
|
||||
|
||||
with LogCapture() as log:
|
||||
|
||||
Reference in New Issue
Block a user