2 Commits

Author SHA1 Message Date
8d814c7658 Try to fix reschedules in seconds
Some checks failed
Push image to registry / build-image (push) Has been cancelled
2025-02-26 07:18:32 +01:00
56ec14f1da Move file 2025-02-24 18:58:22 +01:00
2 changed files with 5 additions and 0 deletions

View File

@ -194,6 +194,11 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
$availibleInButton = $browser->driver->findElement(WebDriverBy::xpath('//button[contains(@class, "daily-free-banner__button")]'));
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, "sec")) {
$this->reschedule(60);
return;
}
$hours = explode(" ", $hours);
$minutes = $hours[4];
$hours = $hours[2];