Starttime of rebootjob was incorrect

This commit is contained in:
Jeroen De Meerleer 2021-05-29 11:51:34 +02:00
parent f3e89fe99e
commit cb848f0bfa
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6

View File

@ -244,9 +244,10 @@ class Job extends Repository
$result = $this->runCommandJob($job);
} elseif($job['data']['crontype'] == 'reboot') {
$result = $this->runRebootJob($job, $starttime);
$starttime = $result['starttime'];
}
$endtime = microtime(true);
$runtime = $endtime - ($result['starttime'] ?? $starttime);
$runtime = $endtime - $starttime;
// handling of response
$addRunSql = 'INSERT INTO run(job_id, exitcode, output, runtime, timestamp) VALUES (:job_id, :exitcode, :output, :runtime, :timestamp)';