Skip to content

Conversation

@miaulalala
Copy link
Collaborator

@miaulalala miaulalala commented Nov 13, 2025

Fixes #2120

Handle the case where the user backend isn't reachable.

Currently, the exception breaks hard when the user backend throws an \Exception and thus, already sent activity emails don't get deleted and are resent on the next batch.

Catching the exception and logging it instead at least doesn't lead to multiple emails being sent.

@miaulalala
Copy link
Collaborator Author

/backport to stable32

@miaulalala
Copy link
Collaborator Author

/backport to stable31

@miaulalala miaulalala force-pushed the fix/2120/catch-user-backend-server-exceptions branch from 35f6cc9 to 41ecd5f Compare November 13, 2025 13:53
@cypress
Copy link

cypress bot commented Nov 13, 2025

Activity    Run #3019

Run Properties:  status check passed Passed #3019  •  git commit 1ea02f394d: fix(emails): catch server connection exceptions
Project Activity
Branch Review fix/2120/catch-user-backend-server-exceptions
Run status status check passed Passed #3019
Run duration 04m 00s
Commit git commit 1ea02f394d: fix(emails): catch server connection exceptions
Committer Anna
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 10
View all changes introduced in this branch ↗︎

Comment on lines +66 to +69
* @param int $limit Number of users we want to send an email to
* @param int $sendTime The latest send time
* @param bool $forceSending Ignores latest send and just sends all emails
* @param int|null $restrictEmails null or one of UserSettings::EMAIL_SEND_*, will overwrite force send
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unnecessary?

@miaulalala miaulalala merged commit d1ad3f3 into master Nov 17, 2025
55 of 59 checks passed
@miaulalala miaulalala deleted the fix/2120/catch-user-backend-server-exceptions branch November 17, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User gets a notification mail every 5 minutes

3 participants