-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Don't schedule konnector alerts too soon
When a konnector fails for an actionnable reason (i.e. the user has the power to fix the underlying issue), we send a notification after the konnector has run and schedule 2 `konnectorAlerts` triggers 3 days and 7 days after to send notifications again in case the konnector is still failing to run. However, we set the starting point of these delays not at the moment when the `konnectorAlerts` service runs for the first time but at the moment the konnector failed for the last time. This date will always be in the past but it can be quite old thus generating reminders scheduled dates very close to the moment the service ran first and sent a notification to the user. It can even be in the past in which case `cozy-stack` will execute the trigger immediately after it is scheduled. In both situations, the user gets spammed with notifications. To prevent these, we will now make sure the reminders are scheduled to be sent at least 2 days after the moment the service first ran.
- Loading branch information
1 parent
e530b90
commit f0adb0d
Showing
4 changed files
with
115 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters