Move tasks to low priority queue from default
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user