改名
This commit is contained in:
+10
-10
@@ -95,16 +95,16 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa
|
|||||||
*/
|
*/
|
||||||
public function consulWatches(OnWorkerStart|OnTaskerStart $server)
|
public function consulWatches(OnWorkerStart|OnTaskerStart $server)
|
||||||
{
|
{
|
||||||
Timer::tick(1000, static function () {
|
// Timer::tick(1000, static function () {
|
||||||
$lists = Kiri::getDi()->get(RpcManager::class)->doneList();
|
// $lists = Kiri::getDi()->get(RpcManager::class)->doneList();
|
||||||
$health = Kiri::getDi()->get(Agent::class)->checks;
|
// $health = Kiri::getDi()->get(Agent::class)->checks;
|
||||||
foreach ($lists as $list) {
|
// foreach ($lists as $list) {
|
||||||
|
//
|
||||||
$health->checks();
|
// $health->checks();
|
||||||
|
//
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ class RpcManager
|
|||||||
$methods = Kiri::getDi()->getReflect($class);
|
$methods = Kiri::getDi()->getReflect($class);
|
||||||
$lists = $methods->getMethods(\ReflectionMethod::IS_PUBLIC);
|
$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) {
|
foreach ($lists as $reflection) {
|
||||||
$methodName = $reflection->getName();
|
$methodName = $reflection->getName();
|
||||||
|
|||||||
Reference in New Issue
Block a user