spatie / laravel-backup

A package to backup your Laravel app

Home Page:https://spatie.be/docs/laravel-backup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

NasrinAfrozKakoli opened this issue · comments

'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);
        }
    }

Fixed in the latest release.