Wait for parent
This commit is contained in:
parent
17fbe5c299
commit
2f8e873cc7
|
@ -1234,9 +1234,13 @@ class Worker
|
|||
// We now are in the new 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