spatie / laravel-backup

A package to backup your Laravel app
https://spatie.be/docs/laravel-backup
MIT License
5.61k stars 758 forks source link

CleanupJob Class's send notification method doesn't handle failure as it does for BackupJob class. #1795

Closed NasrinAfrozKakoli closed 3 months ago

NasrinAfrozKakoli commented 3 months ago

'CleanupJob' Class's 'sendNotification' method doesn't handle failure as it does for 'BackupJob' class. For this the cleanup doesn't continue for the rest of it and or for the rest of the disks.

BackupJob has:

protected function sendNotification($notification): void
    {
        if ($this->sendNotifications) {
            rescue(
                fn () => event($notification),
                fn () => consoleOutput()->error('Sending notification failed')
            );
        }
    }

CleanupJob has:

protected function sendNotification($notification): void
    {
        if ($this->sendNotifications) {
            event($notification);
        }
    }
freekmurze commented 3 months ago

Fixed in the latest release.