From 73ae0cf33eee3fec83ca9b0097ae1569e63e862c Mon Sep 17 00:00:00 2001 From: u2nyakim Date: Fri, 29 Aug 2025 17:54:38 +0800 Subject: [PATCH] =?UTF-8?q?up.=20=E6=B7=BB=E5=8A=A0gateway=20event?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/command/admin/SysGateway.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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(); }