Skip to content

Commit

Permalink
Handle Notification failure in CleanupJob.php as BackupJob.php
Browse files Browse the repository at this point in the history
  • Loading branch information
NasrinAfrozKakoli authored May 29, 2024
1 parent 6c5d0c2 commit cef09c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Tasks/Cleanup/CleanupJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ public function run(): void
protected function sendNotification($notification): void
{
if ($this->sendNotifications) {
event($notification);
rescue(
fn () => event($notification),
fn () => consoleOutput()->error('Sending notification failed')
);
}
}
}

0 comments on commit cef09c7

Please sign in to comment.