modify plugin name
This commit is contained in:
@@ -118,15 +118,16 @@ class ProcessManager
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $processes
|
* @param array|null $processes
|
||||||
* @param \Swoole\Server|null $server
|
* @param \Swoole\Server|null $server
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ConfigException
|
* @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()) {
|
if (Context::inCoroutine()) {
|
||||||
$this->poolManager($processes);
|
$this->poolManager($processes);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ class Server extends HttpService
|
|||||||
$this->onHotReload();
|
$this->onHotReload();
|
||||||
|
|
||||||
$this->processManager->batch($this->process, $this->manager->getServer());
|
$this->processManager->batch($this->process, $this->manager->getServer());
|
||||||
|
$this->processManager->batch(Config::get('processes', []), $this->manager->getServer());
|
||||||
$this->dispatch->dispatch(new OnServerBeforeStart());
|
$this->dispatch->dispatch(new OnServerBeforeStart());
|
||||||
$this->manager->start();
|
$this->manager->start();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user