feat: Update notification handling for subscribers across various jobs #407

Closed
opened 2026-04-05 16:19:36 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @simlarsen on 8/5/2025

  • Introduced a new enum StatusPageSubscriberNotificationStatus to manage notification statuses (Skipped, Pending, InProgress, Success, Failed).
  • Updated SendNotificationToSubscribers jobs for Announcements, Incidents, Scheduled Maintenance, and Public Notes to utilize the new notification status system.
  • Added logic to mark notifications as Skipped if they should not be sent, and to update the status to InProgress when notifications are being processed.
  • Implemented success and failure handling for notifications, updating the respective status and logging errors as needed.
  • Modified database schema to replace old boolean notification flags with the new enum-based status fields, ensuring backward compatibility with existing records.
  • Added migration script to handle the transition of existing records to the new notification status system.

Title of this pull request?

Small Description?

Pull Request Checklist:

  • Please make sure all jobs pass before requesting a review.
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).
  • Have you lint your code locally before submission?
  • Did you write tests where appropriate?

Screenshots (if appropriate):

*Originally created by @simlarsen on 8/5/2025* - Introduced a new enum `StatusPageSubscriberNotificationStatus` to manage notification statuses (Skipped, Pending, InProgress, Success, Failed). - Updated `SendNotificationToSubscribers` jobs for Announcements, Incidents, Scheduled Maintenance, and Public Notes to utilize the new notification status system. - Added logic to mark notifications as Skipped if they should not be sent, and to update the status to InProgress when notifications are being processed. - Implemented success and failure handling for notifications, updating the respective status and logging errors as needed. - Modified database schema to replace old boolean notification flags with the new enum-based status fields, ensuring backward compatibility with existing records. - Added migration script to handle the transition of existing records to the new notification status system. ### Title of this pull request? ### Small Description? ### Pull Request Checklist: - [ ] Please make sure all jobs pass before requesting a review. - [ ] Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such). - [ ] Have you lint your code locally before submission? - [ ] Did you write tests where appropriate? ### Related Issue? ### Screenshots (if appropriate):
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#407