modify plugin name
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Kiri\Server\Abstracts;
|
namespace Kiri\Server\Abstracts;
|
||||||
|
|
||||||
use Kiri\Exception\ConfigException;
|
|
||||||
use Swoole\Http\Server as HServer;
|
use Swoole\Http\Server as HServer;
|
||||||
use Swoole\Server;
|
use Swoole\Server;
|
||||||
use Kiri\Server\Constant;
|
use Kiri\Server\Constant;
|
||||||
@@ -19,11 +18,12 @@ trait TraitServer
|
|||||||
/**
|
/**
|
||||||
* @param array $class
|
* @param array $class
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ConfigException
|
|
||||||
*/
|
*/
|
||||||
public function addProcess(array $class): void
|
public function addProcess(array $class): void
|
||||||
{
|
{
|
||||||
$this->processManager->batch($class);
|
foreach ($class as $item) {
|
||||||
|
$this->_process[] = $item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -115,13 +115,14 @@ class Server extends HttpService
|
|||||||
*/
|
*/
|
||||||
public function start(): void
|
public function start(): void
|
||||||
{
|
{
|
||||||
|
$this->manager->addProcess($this->process);
|
||||||
$this->manager->initCoreServers(Config::get('server', [], true), $this->daemon);
|
$this->manager->initCoreServers(Config::get('server', [], true), $this->daemon);
|
||||||
|
|
||||||
$this->manager->onSignal(Config::get('signal', []));
|
$this->manager->onSignal(Config::get('signal', []));
|
||||||
|
|
||||||
$this->onHotReload();
|
$this->onHotReload();
|
||||||
|
|
||||||
$this->manager->addProcess($this->process);
|
|
||||||
$this->dispatch->dispatch(new OnServerBeforeStart());
|
$this->dispatch->dispatch(new OnServerBeforeStart());
|
||||||
$this->manager->start();
|
$this->manager->start();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user