modify plugin name

This commit is contained in:
2022-06-17 12:33:14 +08:00
parent f85d2aa0a2
commit 2f5b55ea1f
2 changed files with 6 additions and 4 deletions
+5 -4
View File
@@ -118,15 +118,16 @@ class ProcessManager
/**
* @param array $processes
* @param array|null $processes
* @param \Swoole\Server|null $server
* @return void
* @throws ConfigException
*/
public function batch(array $processes, ?\Swoole\Server $server = null): void
public function batch(?array $processes, ?\Swoole\Server $server = null): void
{
$processes = array_merge($processes, Config::get('processes', []));
if (empty($processes)) {
return;
}
if (Context::inCoroutine()) {
$this->poolManager($processes);
return;
+1
View File
@@ -130,6 +130,7 @@ class Server extends HttpService
$this->onHotReload();
$this->processManager->batch($this->process, $this->manager->getServer());
$this->processManager->batch(Config::get('processes', []), $this->manager->getServer());
$this->dispatch->dispatch(new OnServerBeforeStart());
$this->manager->start();
}