Try to fix reschedules in seconds
Some checks failed
Push image to registry / build-image (push) Has been cancelled

This commit is contained in:
2025-02-26 07:18:32 +01:00
parent 56ec14f1da
commit 8d814c7658

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];