From 21adbc4b873720caa53bac2f1bc7cc11c4b06fe5 Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Tue, 2 Feb 2021 10:29:03 -0500 Subject: [PATCH] fix: Rename send_activation_email task (step 2/3) The old name is `student.send_activation_email`. The new name is `common.djangoapps.student.tasks.send_activation_email`. We currently register both the old and the new task names, such that Celery workers recognize the task by both names. This commit switches us from the old name to the new name. --- common/djangoapps/student/tasks.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/djangoapps/student/tasks.py b/common/djangoapps/student/tasks.py index f76ece332e..1c36d654f3 100644 --- a/common/djangoapps/student/tasks.py +++ b/common/djangoapps/student/tasks.py @@ -78,8 +78,8 @@ _NEW_TASK_NAME = 'common.djangoapps.student.tasks.send_activation_email' # Register task under both its old and new names, -# but expose only the old-named task for invocation. -# -> Next step: Once we deploy and teach Celery workers the new name, -# set `send_activation_email` to the new-named task. -send_activation_email = shared_task(bind=True, name=_OLD_TASK_NAME)(_send_activation_email) -shared_task(bind=True, name=_NEW_TASK_NAME)(_send_activation_email) +# but expose only the new-named task for invocation. +# -> Next step: Once we deploy and stop using the old task name, +# stop registering the task under the old name. +shared_task(bind=True, name=_OLD_TASK_NAME)(_send_activation_email) +send_activation_email = shared_task(bind=True, name=_NEW_TASK_NAME)(_send_activation_email)