Merge branch 'bugfix/GS-5'
This commit is contained in:
commit
042ab6ffe3
|
@ -96,8 +96,11 @@ foreach ($results as $result) {
|
||||||
$stmt = $db->prepare("INSERT INTO runs(job, statuscode, result, timestamp) VALUES(?, ?, ?, ?)");
|
$stmt = $db->prepare("INSERT INTO runs(job, statuscode, result, timestamp) VALUES(?, ?, ?, ?)");
|
||||||
$stmt->execute(array($result['jobID'], $statuscode, $body, time()));
|
$stmt->execute(array($result['jobID'], $statuscode, $body, time()));
|
||||||
}
|
}
|
||||||
$nextrun = $result['nextrun'] + $result['delay'];
|
|
||||||
if ($nextrun < time() ) { $nextrun = time() + $result['delay']; }
|
$nextrun = $result['nextrun'];
|
||||||
|
do {
|
||||||
|
$nextrun = $nextrun + $result['delay'];
|
||||||
|
} while ($nextrun < time())
|
||||||
|
|
||||||
$nexttime = $db->prepare("UPDATE jobs SET nextrun = ? WHERE jobID = ?");
|
$nexttime = $db->prepare("UPDATE jobs SET nextrun = ? WHERE jobID = ?");
|
||||||
$nexttime->execute(array($nextrun, $result["jobID"]));
|
$nexttime->execute(array($nextrun, $result["jobID"]));
|
||||||
|
|
Loading…
Reference in New Issue