Let the worker run for an hour in daemon mode

This commit is contained in:
Michael 2021-01-04 09:20:44 +00:00
parent 74d7d7e164
commit 69c7e9af20
2 changed files with 92 additions and 56 deletions

View file

@ -224,8 +224,10 @@ while (true) {
usleep($sleep);
$pid = pcntl_waitpid(-1, $status, WNOHANG);
Logger::info('Checked children status via pcntl_waitpid', ['pid' => $pid, 'status' => $status]);
if ($pid > 0) {
Logger::info('Children quit via pcntl_waitpid', ['pid' => $pid, 'status' => $status]);
}
$timeout = ($seconds >= $wait_interval);
} while (!$timeout && !Worker::IPCJobsExists());