BUGFIX: reboot jobs stopped after triggering initial command
This commit is contained in:
parent
c59a84a34f
commit
12205ad18e
@ -74,13 +74,10 @@ class DaemonCommand extends Command
|
||||
$jobRepo = $this->doctrine->getRepository(Job::class);
|
||||
}
|
||||
|
||||
if(!$async || $pid == -1) {
|
||||
$jobRepo->RunJob($job, $manual);
|
||||
$jobRepo->setJobRunning($job, false);
|
||||
} elseif ($pid == 0) {
|
||||
$jobRepo->RunJob($job, $manual);
|
||||
$jobRepo->setJobRunning($job, false);
|
||||
exit;
|
||||
if((!$async || $pid == -1) || $pid == 0) {
|
||||
$result = $jobRepo->RunJob($job, $manual);
|
||||
if ($result['status'] == 'ran') $jobRepo->setJobRunning($job, false);
|
||||
if ($pid == 0) exit;
|
||||
}
|
||||
unset($jobsToRun[$key]);
|
||||
unset($job);
|
||||
|
@ -516,7 +516,7 @@ class JobRepository extends EntityRepository
|
||||
$this->deleteTempVar($job);
|
||||
$em->persist($job);
|
||||
$em->flush();
|
||||
return ['job_id' => $job->getId(), 'exitcode' => $result['exitcode'], 'timestamp' =>floor($starttime), 'runtime' => $runtime, 'output' => (string)$result['output'], 'flags' => implode("", $flags)];
|
||||
return ['job_id' => $job->getId(), 'status' => 'ran', 'exitcode' => $result['exitcode'], 'timestamp' =>floor($starttime), 'runtime' => $runtime, 'output' => (string)$result['output'], 'flags' => implode("", $flags)];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user