eee
This commit is contained in:
@@ -77,7 +77,7 @@ class OnServerWorker extends Kiri\Server\Abstracts\Server
|
||||
*/
|
||||
protected function processName(Server $server, string $prefix): void
|
||||
{
|
||||
Kiri::setProcessName(sprintf($prefix . ' AbstractProcess[%d].%d', $server->worker_pid, $server->worker_id));
|
||||
Kiri::setProcessName(sprintf($prefix . ' Process[%d].%d', $server->worker_pid, $server->worker_id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,21 +22,13 @@ trait TraitProcess
|
||||
*/
|
||||
public function addProcess(string|array|AbstractProcess $class): void
|
||||
{
|
||||
if (!is_array($class)) {
|
||||
$class = [$class];
|
||||
}
|
||||
if (!is_array($class)) $class = [$class];
|
||||
foreach ($class as $name) {
|
||||
if (is_string($name)) {
|
||||
$name = Kiri::getDi()->get($name);
|
||||
}
|
||||
if (is_string($name)) $name = Kiri::getDi()->get($name);
|
||||
if (isset($this->_process[$name->getName()])) {
|
||||
throw new Exception('AbstractProcess(' . $name->getName() . ') is exists.');
|
||||
}
|
||||
$process = $this->genProcess($name);
|
||||
if ($name->isEnableQueue()) {
|
||||
$process->useQueue();
|
||||
}
|
||||
$this->_process[$name->getName()] = $process;
|
||||
$this->_process[$name->getName()] = $this->genProcess($name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user