This commit is contained in:
2022-05-31 11:03:52 +08:00
parent 9473384c18
commit 95772e794b
+3 -4
View File
@@ -26,9 +26,8 @@ class RpcManager extends Component
/**
* @param string $serviceName
* @return void
* @throws Exception
* @throws Kiri\Exception\ConfigException
*/
public function reRegister(): void
{
@@ -36,11 +35,11 @@ class RpcManager extends Component
$config = Config::get("rpc.consul", null, true);
$info = $service->service->service_health($config['config']['ID']);
$info = $service->service->service_health($config['ID']);
if ($info->getStatusCode() == 200) {
return;
}
$service->service->register($config['config']);
$service->service->register($config);
}