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