From ce3647b5b7464d3edc89e771fc0cd3665dde2d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 2 Dec 2021 14:12:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/RpcJsonp.php | 20 ++++++++++---------- src/RpcManager.php | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/RpcJsonp.php b/src/RpcJsonp.php index 4574df2..36b3bd6 100644 --- a/src/RpcJsonp.php +++ b/src/RpcJsonp.php @@ -95,16 +95,16 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa */ public function consulWatches(OnWorkerStart|OnTaskerStart $server) { - Timer::tick(1000, static function () { - $lists = Kiri::getDi()->get(RpcManager::class)->doneList(); - $health = Kiri::getDi()->get(Agent::class)->checks; - foreach ($lists as $list) { - - $health->checks(); - - - } - }); +// Timer::tick(1000, static function () { +// $lists = Kiri::getDi()->get(RpcManager::class)->doneList(); +// $health = Kiri::getDi()->get(Agent::class)->checks; +// foreach ($lists as $list) { +// +// $health->checks(); +// +// +// } +// }); } diff --git a/src/RpcManager.php b/src/RpcManager.php index 17df993..1d518ab 100644 --- a/src/RpcManager.php +++ b/src/RpcManager.php @@ -28,7 +28,7 @@ class RpcManager $methods = Kiri::getDi()->getReflect($class); $lists = $methods->getMethods(\ReflectionMethod::IS_PUBLIC); - if (!isset($this->_rpc[$name])) $this->_rpc[$name] = ['methods' => [], 'id' => $serviceConfig['id'], 'config' => $serviceConfig]; + if (!isset($this->_rpc[$name])) $this->_rpc[$name] = ['methods' => [], 'id' => $serviceConfig['ID'], 'config' => $serviceConfig]; foreach ($lists as $reflection) { $methodName = $reflection->getName();