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:
Justin Hynes
2022-05-20 10:30:06 -04:00
parent 75ca47695c
commit 8026f74e80
5 changed files with 21 additions and 6 deletions

View File

@@ -526,7 +526,7 @@ def submit_scheduled_task(schedule):
# turn this into the format Celery expects
task_args = [schedule.task.id, task_arguments]
# submit the task
log.info(f"Submitting scheduled task {schedule.task.id} for processing")
log.info(f"Submitting scheduled task '{schedule.task.id}' for processing")
task_class.apply_async(task_args, task_id=schedule.task.task_id)
except Exception as error: # pylint: disable=broad-except
# broad except here to make sure we cast a wide net for tasks with issues that can't be processed