Reduce the number of retries.
This task will get run twice, 5 minutes apart. Because of that, it can run up to 6 times with max_retries set to 2.
This commit is contained in:
@@ -15,7 +15,7 @@ from openedx.core.djangoapps.course_groups.cohorts import (
|
||||
LOGGER = get_task_logger(__name__)
|
||||
|
||||
|
||||
@task(bind=True, default_retry_delay=60, max_retries=4)
|
||||
@task(bind=True, default_retry_delay=60, max_retries=2)
|
||||
def sync_cohort_with_mode(self, course_id, user_id, verified_cohort_name, default_cohort_name):
|
||||
"""
|
||||
If the learner's mode does not match their assigned cohort, move the learner into the correct cohort.
|
||||
|
||||
Reference in New Issue
Block a user