BUGFIX: I don't eat brains

main
Jeroen De Meerleer 1 year ago
parent 4dd743c732
commit 9ab63f7de1
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
  1. 6
      src/Command/DaemonCommand.php

@ -50,7 +50,9 @@ class DaemonCommand extends Command
foreach($jobsToRun as $job) {
$jobRepo->setJobRunning($job, true);
$output->writeln('Runnig Job ' . $job);
$pid = pcntl_fork();
declare(ticks = 1);
pcntl_signal(SIGCHLD, SIG_IGN);
$pid = pcntl_fork();
if($pid == -1) {
$jobRepo->RunJob($job);
$jobRepo->setJobRunning($job, false);
@ -70,4 +72,4 @@ class DaemonCommand extends Command
$output->writeln('Ended after ' . $timelimit . ' seconds');
return Command::SUCCESS;
}
}
}

Loading…
Cancel
Save