Added notification on job fail
All checks were successful
Push image to registry / build-image (push) Successful in 5m20s

This commit is contained in:
2025-03-01 15:12:15 +01:00
parent 025711e09d
commit 6a95653c52
7 changed files with 107 additions and 6 deletions

View File

@ -5,6 +5,8 @@ namespace App\Browser;
use App\Models\Job;
use App\Models\JobArtifact;
use App\Models\JobRun;
use App\Notification\Notifications\JobErrorNotification;
use App\Notification\Providers\AllNotification;
use Closure;
use Exception;
use Facebook\WebDriver\Chrome\ChromeOptions;
@ -57,6 +59,7 @@ abstract class BrowserJob implements ShouldQueue
}
catch (Throwable $e) {
$browser->screenshot("failure-{$this->jobId}");
AllNotification::send(new JobErrorNotification($this->jobId, $e->getMessage()));
dump($e);
throw $e;
} finally {