Sort of working beta

This commit is contained in:
2025-02-06 17:30:45 +01:00
parent 5f42c707eb
commit 2ef114e154
97 changed files with 3093 additions and 106 deletions

View File

@ -0,0 +1,41 @@
<?php
namespace App\Browser\Jobs\Parameters;
use App\Browser\BrowserJob;
use App\Models\JobArtifact;
use App\Models\JobRun;
use App\Notification\Notifications\SimpleNotification;
use App\Notification\Providers\AllNotification;
use Laravel\Dusk\Browser;
class ParametersJob extends BrowserJob
{
public function __construct()
{
parent::__construct(1);
}
/**
* @inheritDoc
*/
public function run(Browser $browser): ?JobRun
{
return null;
}
/**
* @inheritDoc
*/
public function runTest(Browser $browser): ?JobRun
{
try {
AllNotification::send(new SimpleNotification($this->jobId, "Test", "Test des notifications"));
AllNotification::send(new SimpleNotification($this->jobId, "Test", "Test des notifications d'erreur", true));
return $this->makeSimpleJobRun(true, "Envoi de notification réussi", "Datboi a réussi à envoyer des notifications");
} catch (\Throwable $e) {
return $this->makeSimpleJobRun(false, "Envoi de notification échoué", "Datboi n'a pas réussi à envoyer des notifications :\n" . $e->getMessage());
}
}
}