Wait for parent
This commit is contained in:
parent
17fbe5c299
commit
2f8e873cc7
1 changed files with 7 additions and 3 deletions
|
@ -1235,8 +1235,12 @@ class Worker
|
|||
DBA::connect();
|
||||
/// @todo Reinitialize the logger to set a new process_id and uid
|
||||
|
||||
self::IPCSetJobState(true, getmypid());
|
||||
Logger::info('Worker spawned', ['pid' => getmypid()]);
|
||||
$cycles = 0;
|
||||
while (!self::IPCJobsExists($pid) && (++$cycles < 100)) {
|
||||
usleep(10000);
|
||||
}
|
||||
|
||||
Logger::info('Worker spawned', ['pid' => getmypid(), 'wait_cycles' => $cycles]);
|
||||
|
||||
self::processQueue($do_cron);
|
||||
|
||||
|
|
Loading…
Reference in a new issue