Mailer jobs not cleaned up when a notification is destroyed
This pull request adds defensive error handling in the mailer functionality to gracefully handle cases where notifications are destroyed before email delivery. Specifically:
- Adds checks to prevent mailer failures when trying to send emails for deleted notifications
- Implements validation to handle nil or empty notification collections in batch emails
- Filters out destroyed notifications from batch email groups before processing
- Updates the CHANGELOG to document this bug fix
The changes improve system stability by preventing errors that could occur when notifications are deleted during asynchronous email processing.
Resolves #50
To provide feedback, navigate to the Files changed tab and leave comments on the proposed code changes. Choose Start review for each comment, and then choose Request changes, and I'll propose revised changes.
:hourglass_flowing_sand: I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done
:white_check_mark: I finished the code review, and left comments with the issues I found. I will now generate code fix suggestions.
coverage: 100.0%. remained the same when pulling 50c2f2400f619873ea2b47a9331efca7a3d25b04 on Q-DEV-issue-50-1747719766 into 42ae932b3775f53c1c83196448745f57dd3a1ce3 on master.
:white_check_mark: I updated this pull request based on the pipeline log.
:warning: One or more of the provided pipeline logs are too long. I'm only reviewing the last 20000 words of that log(s).
:white_check_mark: I updated this pull request based on the pipeline log.
:warning: One or more of the provided pipeline logs are too long. I'm only reviewing the last 20000 words of that log(s).
:white_check_mark: I updated this pull request based on the pipeline log.
:warning: One or more of the provided pipeline logs are too long. I'm only reviewing the last 20000 words of that log(s).
:red_circle: I'm sorry, I can't create any more revisions for this pipeline failure.