Fix exit condition in DaemonCommand.php
The code change fixes the exit condition in the DaemonCommand.php file. Previously, the code would exit if `$pid` was equal to 0, but now it will only exit if `$pid` is set and equal to 0. This ensures that the correct condition is checked before exiting.
This commit is contained in:
parent
0d0b3b2e94
commit
7b899a01ef
|
@ -82,7 +82,7 @@ class DaemonCommand extends Command
|
|||
if((!$async || $pid == -1) || $pid == 0) {
|
||||
$result = $jobRepo->RunJob($job, $manual);
|
||||
if ($result['status'] == 'ran') $jobRepo->setJobRunning($job, false);
|
||||
if ($pid == 0) exit;
|
||||
if (isset($pid) && $pid == 0) exit;
|
||||
}
|
||||
unset($jobsToRun[$key]);
|
||||
unset($job);
|
||||
|
|
Loading…
Reference in New Issue