-
Notifications
You must be signed in to change notification settings - Fork 58
[Announcement] Add one time notice mailer #11086
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
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Event.includes(:config).where(config: { generate_monthly_announcement: true }).find_each do |event| | ||
monthly_announcement = event.announcements.monthly.last | ||
|
||
if monthly_announcement.present? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
concern: does this mean we'll keep sending these until they post an announcement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this was just meant to be a one time email - the check for monthly announcement is present is in case an event enabled generating monthly announcements after this month's job ran
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! are we confident these won't double send?
Not 100% - it's unlikely that they will ratelimit since when we run this job it will be the only mass email send running - however I can't be 100% sure that something else won't error and cause the job to re-run. I'd like to get this sent out soon but it's better to wait until we have better error handling and ratelimiting for emails before running this, I'll be working on that next with the goal of getting it done to send this email out early next week |
Summary of the problem
A notice should be sent out to managers of organizations that have had monthly announcements automatically enabled to let them know about the feature.
Describe your changes
Adds the notice email to the announcement mailer, and a one time job to send out the email.