Move tasks to low priority queue from default

This commit is contained in:
Joseph Mulloy
2018-10-02 13:26:40 -04:00
parent eae5a8117f
commit 1533623a0d
3 changed files with 3 additions and 2 deletions

View File

@@ -238,7 +238,7 @@ def perform_delegate_email_batches(entry_id, course_id, task_input, action_name)
return progress
@task(default_retry_delay=settings.BULK_EMAIL_DEFAULT_RETRY_DELAY, max_retries=settings.BULK_EMAIL_MAX_RETRIES)
@task(default_retry_delay=settings.BULK_EMAIL_DEFAULT_RETRY_DELAY, max_retries=settings.BULK_EMAIL_MAX_RETRIES, routing_key=settings.LOW_PRIORITY_QUEUE)
def send_course_email(entry_id, email_id, to_list, global_email_context, subtask_status_dict):
"""
Sends an email to a list of recipients.

View File

@@ -138,7 +138,7 @@ def delete_problem_state(entry_id, xmodule_instance_args):
return run_main_task(entry_id, visit_fcn, action_name)
@task(base=BaseInstructorTask)
@task(base=BaseInstructorTask, routing_key=settings.LOW_PRIORITY_QUEUE)
def send_bulk_course_email(entry_id, _xmodule_instance_args):
"""Sends emails to recipients enrolled in a course.

View File

@@ -30,6 +30,7 @@ def block_structure_task(**kwargs):
default_retry_delay=settings.BLOCK_STRUCTURES_SETTINGS['TASK_DEFAULT_RETRY_DELAY'],
max_retries=settings.BLOCK_STRUCTURES_SETTINGS['TASK_MAX_RETRIES'],
bind=True,
routing_key=settings.LOW_PRIORITY_QUEUE,
**kwargs
)