diff --git a/src/Core/Process.php b/src/Core/Process.php index 919d37dea1..447d312d44 100644 --- a/src/Core/Process.php +++ b/src/Core/Process.php @@ -77,6 +77,17 @@ class Process $this->pid = $pid; } + /** + * Set the process id + * + * @param integer $pid + * @return void + */ + public function setPid(int $pid) + { + $this->pid = $pid; + } + /** * Log active processes into the "process" table */ diff --git a/src/Core/Worker.php b/src/Core/Worker.php index d2468a2a80..54bfdedf3e 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -1234,6 +1234,7 @@ class Worker // We now are in the new worker DBA::connect(); /// @todo Reinitialize the logger to set a new process_id and uid + DI::process()->setPid($pid); $cycles = 0; while (!self::IPCJobsExists($pid) && (++$cycles < 100)) {