sforkowany z mirror/friendica
Set the new pid
rodzic
2f8e873cc7
commit
6ef0f9646f
|
@ -77,6 +77,17 @@ class Process
|
||||||
$this->pid = $pid;
|
$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
|
* Log active processes into the "process" table
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1234,6 +1234,7 @@ 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
|
||||||
|
DI::process()->setPid($pid);
|
||||||
|
|
||||||
$cycles = 0;
|
$cycles = 0;
|
||||||
while (!self::IPCJobsExists($pid) && (++$cycles < 100)) {
|
while (!self::IPCJobsExists($pid) && (++$cycles < 100)) {
|
||||||
|
|
Ładowanie…
Reference in New Issue