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

Periodic notification preferences #14

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

ianmcorvidae
Copy link
Member

These changes should make it so timelord respects the notification preferences stored in the job submission. NotifyPeriodic denotes whether emails should be sent for periodic notifications, not whether the notifications should be sent at all.

@@ -186,7 +188,7 @@ func SendPeriodicNotification(ctx context.Context, j *Job) error {
durString,
)

return sendNotif(ctx, j, j.Status, subject, msg, "analysis_periodic_notification")
return sendNotif(ctx, j, j.Status, subject, msg, j.NotifyPeriodic, "analysis_periodic_notification")
Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't actually moved the NotifyPeriodic into the notif_statuses table, because it's static anyway and I didn't really want to write another database migration. The interval is still there, and it's beneficial for it to be since it's used for filtering the list of jobs that may need notification.

Copy link
Member

@slr71 slr71 left a comment

Choose a reason for hiding this comment

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

LGTM! :shipit:

@ianmcorvidae
Copy link
Member Author

Cool, thanks for giving it a look. I'll get this into QA and then see what I can break, I guess 😆

@ianmcorvidae ianmcorvidae merged commit eb4fe78 into cyverse-de:main Sep 26, 2024
3 checks passed
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