Commit Graph

38 Commits

Author SHA1 Message Date
Eemaan Amir
e5f7a027e4 feat: added a new field to canvas_entry_properties in enrollment email (#36603)
* feat: added a new field to canvas_entry_properties in enrollment email

* test: updated test files
2025-04-25 17:27:49 +05:00
Muhammad Faraz Maqsood
591008280f chore: rename braze_client to email_client 2025-03-26 11:21:56 +05:00
Muhammad Faraz Maqsood
2b83fe3bf4 Revert "chore: rename braze_client to email_client"
This reverts commit b3f9903a4b.
2025-03-25 17:38:32 +05:00
Muhammad Faraz Maqsood
b3f9903a4b chore: rename braze_client to email_client 2025-03-25 10:31:32 +05:00
Zainab Amir
fa7953ca24 feat: set traverse pagination to False (#32269)
* For enrollment email task, while getting course uuid and
owner data don't traverse the discovery endpoint.
* Update log message
2023-05-19 19:46:33 +05:00
John Nagro
0fd36f97f3 fix: adding some logging and exceptions to further investigation into discovery load (#32267) 2023-05-18 19:42:19 -04:00
Shahbaz Shabbir
cf27d344bd fix: Add longer retry schedule for course enrollment emails (#31854) 2023-03-06 10:44:38 +05:00
Tim McCormack
83f6e560b7 fix: Add code_owner decorator to remaining Celery tasks (#31762)
This will ensure that errors raised by these tasks will alert the right
team. `send_course_enrollment_email` is the one I set out to fix, but I
discovered a few others.

I located tasks that were missing decorators by running the following
search and visually inspecting the results, although semgrep might be able
to do better:

```
ack '^@.*task|^@set_code_owner_attribute' cms lms common openedx xmodule --ignore-dir=tests --python
```

Also, add more detailed explanation of why a couple of tasks can't use the
decorator. This should only be an issue on tasks inheriting from
UserTaskMixin, which in practice is just CourseExportTask and
CourseImportTask (and the apparently unused EnrollmentReadTask and
EnrollmentWriteTask), via UserTask.
2023-02-15 18:20:50 +00:00
shahbaz-arbisoft
4797f2f1c8 fix: Update enrollment email for master track learners 2023-01-16 15:33:53 +05:00
Mubbshar Anwar
3941fa5083 fix: hide course dates block (#31335)
If course is archived hide the course dates block from email..

VAN-1176
2022-11-24 23:29:12 +05:00
Mubbshar Anwar
dccb792f73 fix: Add segment event (#31316)
- add segment event to analyze course enrolment email sections data.
- update exception logs.

VAN-1168
2022-11-22 11:10:26 +05:00
Shahbaz Shabbir
ee6f3164c3 feat: add course enrollment email task (#31241) 2022-11-18 17:25:52 +05:00
Zainab Amir
bf76fb3f7f move send_activation_email celery task (#28666)
- moved send_activation_email to user_authn app
- registered task under both new and old name
- exposed the old name for task invocation

VAN-417
2021-09-08 10:44:54 +05:00
Michael Terry
570a869bd3 feat: update to edx-ace 1.0.0
The new version switches how you specify recipients, to use
lms_user_id instead of usernames.

AA-489
2021-03-12 10:25:54 -05:00
Kyle McCormick
3185dda123 fix: Rename send_activation_email task (step 3/3) (#26329)
The old name was
`student.send_activation_email`.

The new name is now
`common.djangoapps.student.tasks.send_activation_email`.

We no longer user the old task name,
so we can safely stop registering it with Celery
workers, without fear of dropping any lingering
tasks under the old name.
2021-02-03 11:10:01 -05:00
Kyle McCormick
1d2d59f8bd Merge pull request #26328 from edx/kdmccormick/send-activation-email-2
fix: rename send_activation_email task (step 2/3)
2021-02-03 09:09:31 -05:00
Jawayria
633b9f7060 resolved errors 2021-02-03 15:47:18 +05:00
Jawayria
45e5cbb599 Applied pylint-amnesty to student 2021-02-03 15:30:47 +05:00
Jawayria
8086ca75f2 Applied pylint-amnesty to student 2021-02-03 15:29:53 +05:00
Kyle McCormick
21adbc4b87 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.
2021-02-02 10:31:38 -05:00
Kyle McCormick
b626a43fa1 fix: Rename some tasks to match new import paths (#26236)
Several tasks are explicitly named as (or like)
their old, deprecated import path.

The issue here is that django-user-tasks listens for task
invocations, and attempts to import the task based on its name.
If the task name is completely wrong, user-tasks will catch
the ImportError and move on.
If the task is a valid *deprecated* import, though, then
user-tasks will choke on the raised `DeprecatedEdxPlatformImportError`.

Thus, we must rename three tasks to their new full path:
1. entitlements.expire_old_enrollments
2. third_party_auth.fetch_saml_metadata
3. student.send_activation_email

The first two are run daily, and so are safe to be
renamed in place.

The third task must be renamed using an expand-contract
pattern; otherwise, we would drop hundreds of tasks
during the App vs. Worker out-of-sync version window
that happens at deployments.
This commit is the expand phase.
2021-02-02 10:26:08 -05:00
Muhammad Soban Javed
d26a59eb67 import task decorator from celery APP instance in CMS (#25953)
* import task decorator from celery APP instance instead of celery package in CMS

* replaced task decorator with shared_task in cms and common

* Fixed import of shared_task

* Fixed import
2021-01-27 18:35:11 +05:00
Robert Raposa
8eef18710d set code_owner for celery tasks
ARCHBOM-1260

Co-authored-by: Tim McCormack <tmccormack@edx.org>
2020-11-17 15:33:33 -05:00
Kyle McCormick
73739189c5 Undo renames of common.djangoapps tasks (#25566)
When rolling out #25477, we dropped hundreds of email activation
tasks due to the renaming of student.send_activation_email
to common.djangoapps.student.send_activation_email,
and lost more when we rolled that PR back.
This happens because of blue/green deployment:
old workers are still online for a while after deploying,
so there is a period of time when the task names are mismatched.

To prevent this from happening again, this will make
it so the import changes don't change the names of
any of the Celery tasks.
2020-11-10 16:31:48 -05:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Awais Jibran
bb4b38b30b Do not log after sending activation email 2020-03-25 11:54:28 +05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Mahyar Damavand
4ff5d129c8 Fix issues with PR #18928 ...
Fix celery task failure
Fix code quality test failures
Fix python test failures
Fix issue with PR #22042
Rebase and fix new test failures
2019-11-25 23:56:10 +03:30
Shadi Naif
f93023bafe Convert Account Activation Emails to edx-ACE 2019-11-25 23:56:09 +03:30
Ned Batchelder
ea30aba6fc Revert pull request #22042
Revert "Fix code quality test failures"

This reverts commit 8c55e11d1f.

Revert "Fix celery send_activation_email task failure"

This reverts commit 810eea0e51.

Revert "Convert Account Activation Emails to edx-ACE"

This reverts commit 7984c37a4f.
2019-10-18 15:31:09 -04:00
Mahyar Damavand
810eea0e51 Fix celery send_activation_email task failure 2019-10-15 18:30:13 +03:30
Shadi Naif
7984c37a4f Convert Account Activation Emails to edx-ACE 2019-10-14 17:22:03 +03:30
Jeremy Bowman
47516dbead Run python-modernize on student/*.py (#20411) 2019-05-06 14:50:42 -04:00
Bill DeRusha
2b11068622 Revert "Convert Account Activation Emails to edx-ACE" 2019-05-01 16:30:09 -04:00
Shadi Naif
07f588517b Convert Account Activation Emails to edx-ACE 2019-04-27 13:21:34 +03:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
uzairr
07ddf9b452 Send activation email to un-activated user 2017-03-02 10:04:09 +00:00
attiyaishaque
0ffde1a620 ECOM-5281 Adding retries and celery task for sending activation email. 2016-11-07 11:23:43 +05:00