Replies: 1 comment 1 reply
-
Feel free to make a PR for that |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It can happen that an error occurs in an event handler e.g. while adding files to the manifest in a listerner of the
BackupManifestWasCreated
event.In such a case, the current behaviour is that laravel-backup will still continue its processing and eventually consider the backup as successful, preventing the people monitoring the notifications from knowing about the error.
It might be interesting to consider exceptions sent in event listeners as deal-breakers and to halt the process and trigger the
BackupHasFailed
event as a consequence.To illustrate the case, I'm using the
BackupManifestWasCreated
event to download files to be backed up from an S3 bucket (I want to backup this bucket), store them locally and include them in the backup.The code I'm using right now to be notified of an issue with my S3 sync implementation is the following:
The issue with this code today is that the backup process will continue anyway (no way to halt it) and I'll receive both a "backup failed" (sent by my code) and a "backup successful" (sent by laravel-backup) notifications.
Beta Was this translation helpful? Give feedback.
All reactions