Fix exception handling in job classes
This commit is contained in:
parent
b04ab5aa20
commit
215b15946e
|
@ -55,7 +55,7 @@ class NotifyUsersManualModeOnJob implements ShouldQueue
|
|||
}
|
||||
}
|
||||
|
||||
public function failed(\Error|\TypeError $exception = null)
|
||||
public function failed($exception = null)
|
||||
{
|
||||
if (app()->bound('sentry')) {
|
||||
app('sentry')->captureException($exception);
|
||||
|
|
|
@ -24,4 +24,11 @@ class RemoveOldIpAddressesFromLogsJob implements ShouldQueue
|
|||
Log::where('created_at', '<', Carbon::now()->subWeeks(2))
|
||||
->update(['ip' => null]);
|
||||
}
|
||||
|
||||
public function failed($exception = null)
|
||||
{
|
||||
if (app()->bound('sentry')) {
|
||||
app('sentry')->captureException($exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class ResetAvailabilityMinutesJob implements ShouldQueue
|
|||
}
|
||||
}
|
||||
|
||||
public function failed(\Error|\TypeError $exception = null)
|
||||
public function failed($exception = null)
|
||||
{
|
||||
if (app()->bound('sentry')) {
|
||||
app('sentry')->captureException($exception);
|
||||
|
|
|
@ -95,7 +95,7 @@ class UpdateAvailabilityWithSchedulesJob implements ShouldQueue
|
|||
TelegramBot::sendTeamMessage($text);
|
||||
}
|
||||
|
||||
public function failed(\Error|\TypeError $exception = null)
|
||||
public function failed($exception = null)
|
||||
{
|
||||
if (app()->bound('sentry') && !is_null($exception)) {
|
||||
app('sentry')->captureException($exception);
|
||||
|
|
Loading…
Reference in New Issue