Reschedule 24hr after getting dailyFree
All checks were successful
Push image to registry / build-image (push) Successful in 3m53s

This commit is contained in:
2025-02-26 18:25:20 +01:00
parent b177b27390
commit 7abfea14e6

View File

@ -20,6 +20,7 @@ use Laravel\Dusk\Browser;
class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
{
private const STEAM_LOGIN_THRESHOLD = 5 * 60; // 5 minutes
private const APPROXIMATIVE_RUNNING_MINUTES = 2;
private JobRun $jobRun;
@ -223,6 +224,8 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
$lootElement = $browser->driver->findElement(WebDriverBy::xpath('//div[contains(@class, "daily-free-win-bonus")]'));
$lootElement->takeElementScreenshot(HellcaseDailyFreeScreenshot::getImgFileAbsolutePath());
$this->reschedule((24 * 60) - ($this::APPROXIMATIVE_RUNNING_MINUTES / 2)); // Reschedule in 24hr -1min
AllNotification::send(
new HellcaseNotificationDailyFree($this->jobId, new HellcaseNotificationDailyFreeBody())
);