Added Debug notifications
Some checks failed
Push image to registry / build-image (push) Failing after 3m41s

This commit is contained in:
2025-03-02 10:03:27 +01:00
parent cdcdcd9e8b
commit fec63ff249
6 changed files with 128 additions and 3 deletions

View File

@ -4,6 +4,7 @@ namespace App\Browser\Jobs\Hellcase;
use App\Browser\BrowserJob;
use App\Browser\Components\Hellcase\MainNav;
use App\Browser\JobDebugScreenshot;
use App\Browser\Jobs\Hellcase\HellcaseLoginQrCode;
use App\Models\JobArtifact;
use App\Models\JobRun;
@ -11,6 +12,7 @@ use App\Notification\NotificationBody\Hellcase\HellcaseNotificationDailyFreeBody
use App\Notification\NotificationBody\Hellcase\HellcaseNotificationLoginBody;
use App\Notification\Notifications\Hellcase\HellcaseNotificationDailyFree;
use App\Notification\Notifications\Hellcase\HellcaseNotificationLogin;
use App\Notification\Notifications\JobDebugNotification;
use App\Notification\Notifications\JobErrorNotification;
use App\Notification\Providers\AllNotification;
use Facebook\WebDriver\WebDriverBy;
@ -102,7 +104,8 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
try {
$qrCode = $browser->driver->findElement(WebDriverBy::xpath('//div[./*[contains(text(), "Or sign in with QR")]]'));
} catch (\Exception $e) {
AllNotification::send(new JobErrorNotification($this->jobId, "Le QR code de la page de connexion de Steam n'a pas été trouvé"));
$browser->takeScreenshot(JobDebugScreenshot::getFileName($this->jobId));
AllNotification::send(new JobDebugNotification($this->jobId, "Le QR code de la page de connexion de Steam n'a pas été trouvé"));
throw $e;
}
@ -206,6 +209,8 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
$hours = $availibleInButton->getText();
// If the text is like "in 26 sec." we need to put one minute
if (!str_contains($hours, "hr")) {
$browser->takeScreenshot(JobDebugScreenshot::getFileName($this->jobId));
AllNotification::send(new JobDebugNotification($this->jobId, "I hate niggers"));
// $this->reschedule(1);
sleep(60);
return $this->getDailyFree($browser);