Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNTOR-3919: cronjob WIP for churn emails #5495

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

MNTOR-3919: cronjob WIP for churn emails #5495

wants to merge 12 commits into from

Conversation

mansaj
Copy link
Collaborator

@mansaj mansaj commented Jan 14, 2025

References:

Jira: MNTOR-3919

Description

Cronjob for sending out emails

Checklist (Definition of Done)

  • Commits in this PR are minimal and have descriptive commit messages.
  • I've added or updated the relevant sections in readme and/or code comments
  • I've added a unit test to test for potential regressions of this bug.
  • If this PR implements a feature flag or experimentation, the Ship Behind Feature Flag status in Jira has been set
  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.


const results: FxaChurnSubscriber[] = [];

return new Promise((resolve, reject) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part is still TBD, I'm looking into perhaps a different way of getting the data in

);
}

async function sendChurnDiscountEmail(subscriber: FxaChurnSubscriber) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rendering of the email part will go here @Vinnl

@mansaj mansaj requested review from rhelmer and Vinnl January 14, 2025 01:15
Copy link

Copy link
Collaborator

@rhelmer rhelmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm at a high level - I guess we'd need to remove the unused imports and finalize the way we're getting this data. @mansaj is there any point to storing this in our DB or caching it etc. or are you planning to just read it and move on? Any concern about duplicates (I assume we keep track of who we emailed this to and don't resend)?

@mansaj
Copy link
Collaborator Author

mansaj commented Jan 14, 2025

lgtm at a high level - I guess we'd need to remove the unused imports and finalize the way we're getting this data. @mansaj is there any point to storing this in our DB or caching it etc. or are you planning to just read it and move on? Any concern about duplicates (I assume we keep track of who we emailed this to and don't resend)?

ideally we don't store at all.
There is a new field I added with the previous PRs to address the dup check, there's a section in this PR to check for dups in the script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants