modify plugin name
This commit is contained in:
+3
-2
@@ -39,7 +39,6 @@ class ProcessManager
|
|||||||
*/
|
*/
|
||||||
public function add(string|OnProcessInterface|BaseProcess $customProcess, string $tag = 'default')
|
public function add(string|OnProcessInterface|BaseProcess $customProcess, string $tag = 'default')
|
||||||
{
|
{
|
||||||
$server = Kiri::getDi()->get(SwooleServerInterface::class);
|
|
||||||
if (is_string($customProcess)) {
|
if (is_string($customProcess)) {
|
||||||
$customProcess = Kiri::getDi()->get($customProcess);
|
$customProcess = Kiri::getDi()->get($customProcess);
|
||||||
}
|
}
|
||||||
@@ -48,9 +47,11 @@ class ProcessManager
|
|||||||
|
|
||||||
$this->logger->debug($system . ' ' . $customProcess->getName() . ' start.');
|
$this->logger->debug($system . ' ' . $customProcess->getName() . ' start.');
|
||||||
$process = $this->parse($customProcess, $system);
|
$process = $this->parse($customProcess, $system);
|
||||||
if (Context::inCoroutine()) {
|
if (!Kiri::getDi()->has(SwooleServerInterface::class)) {
|
||||||
$process->start();
|
$process->start();
|
||||||
} else {
|
} else {
|
||||||
|
$server = Kiri::getDi()->get(SwooleServerInterface::class);
|
||||||
|
|
||||||
$server->addProcess($process = $this->parse($customProcess, $system));
|
$server->addProcess($process = $this->parse($customProcess, $system));
|
||||||
}
|
}
|
||||||
$this->_process[$tag][$customProcess->getName()] = $process;
|
$this->_process[$tag][$customProcess->getName()] = $process;
|
||||||
|
|||||||
Reference in New Issue
Block a user