Update norun calculation to include equal values for nextrun and lastrun.

- Adjusted the norun calculation to consider equal values for nextrun and lastrun in JobRepository.
This commit is contained in:
Jeroen De Meerleer 2024-07-29 06:35:41 +02:00
parent e539a9f062
commit 4bffef7b02
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6

View File

@ -87,7 +87,7 @@ class JobRepository extends EntityRepository
$job->setData('host-displayname', $jobData['host']);
$job->setData('host', $jobData['host']);
$job->setData('service', $jobData['service'] ?? '');
$job->setData('norun', $job->getLastrun() !== null && $job->getNextrun() > $job->getLastrun());
$job->setData('norun', $job->getLastrun() !== null && $job->getNextrun() >= $job->getLastrun());
$job->setData('running', $job->getRunning() != 0);
$failedruns = $runRepo->getRunsForJob($job, true, $jobData['fail-days']);
$failed = count($failedruns);