diff --git a/app/command/admin/SysGateway.php b/app/command/admin/SysGateway.php index f7fb3a0..3875409 100644 --- a/app/command/admin/SysGateway.php +++ b/app/command/admin/SysGateway.php @@ -35,15 +35,25 @@ class SysGateway extends Command $argv[] = '-g'; } + /* + * 载入注册中心 + */ + $this->startRegister(); - $register = $this->startRegister(); - $gateway = $this->startGateway(); + /* + * 载入网关中心 + */ + $this->startGateway(); + /* + * 业务处理器 + */ $worker = new BusinessWorker(); $worker->name = 'ChatBusinessWorker'; $worker->count = 4; $worker->registerAddress = '127.0.0.1:1236'; $worker->eventHandler = AdminGatewayEvents::class; + // 运行所有服务 Worker::runAll(); }