Fix Laravel Sentry integration

This commit is contained in:
Matteo Gheza 2023-09-03 00:42:54 +02:00
parent 6e13e6de70
commit 5aca8b9947
2 changed files with 9 additions and 7 deletions

View File

@ -17,14 +17,14 @@ class Kernel extends ConsoleKernel
protected function schedule(Schedule $schedule): void
{
$schedule->job(new UpdateAvailabilityWithSchedulesJob)
->everyThirtyMinutes()
->sentryMonitor();
->everyThirtyMinutes();
//->sentryMonitor();
$schedule->job(new NotifyUsersManualModeOn)
->dailyAt('7:00')
->sentryMonitor();
->dailyAt('7:00');
//->sentryMonitor();
$schedule->job(new ResetAvailabilityMinutes)
->monthlyOn(1, '0:00')
->sentryMonitor();
->monthlyOn(1, '0:00');
//->sentryMonitor();
}
/**

View File

@ -5,6 +5,8 @@ namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
use Sentry\Laravel\Integration;
class Handler extends ExceptionHandler
{
/**
@ -42,7 +44,7 @@ class Handler extends ExceptionHandler
public function register(): void
{
$this->reportable(function (Throwable $e) {
//
Integration::captureUnhandledException($e);
});
}
}