From 0014045d52dba2a4b8a0461516b3d7044432b792 Mon Sep 17 00:00:00 2001 From: Matthias Guillitte Date: Sun, 2 Mar 2025 13:29:37 +0100 Subject: [PATCH] Fix job --- app/Browser/Jobs/Hellcase/HellcaseJob.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Browser/Jobs/Hellcase/HellcaseJob.php b/app/Browser/Jobs/Hellcase/HellcaseJob.php index 221abb2..e7460fd 100644 --- a/app/Browser/Jobs/Hellcase/HellcaseJob.php +++ b/app/Browser/Jobs/Hellcase/HellcaseJob.php @@ -104,7 +104,7 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing try { $qrCode = $browser->driver->findElement(WebDriverBy::xpath('//div[./*[contains(text(), "Or sign in with QR")]]')); } catch (\Exception $e) { - $browser->takeScreenshot(JobDebugScreenshot::getFileName($this->jobId)); + $browser->screenshot(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; } @@ -208,8 +208,8 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing if ($availibleInButton->getAttribute("disabled") == "true") { $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)); + if (str_contains(strtolower($hours), "seconds")) { + $browser->screenshot(JobDebugScreenshot::getFileName($this->jobId)); AllNotification::send(new JobDebugNotification($this->jobId, "I hate niggers")); // $this->reschedule(1); sleep(60);