chenshouye168 commented on code in PR #4670:
URL:
https://github.com/apache/servicecomb-java-chassis/pull/4670#discussion_r1908344617
##########
service-registry/registry-zookeeper/src/main/java/org/apache/servicecomb/registry/zookeeper/ZookeeperRegistration.java:
##########
@@ -187,8 +195,19 @@ public ZookeeperRegistrationInstance
getMicroserviceInstance() {
@Override
public boolean updateMicroserviceInstanceStatus(MicroserviceInstanceStatus
status) {
- // not support yet
- return true;
+ this.instance.getPayload().setStatus(status);
+ try {
+ if (status == MicroserviceInstanceStatus.UP){
+ dis.updateService(instance);
+ }
+ if (status == MicroserviceInstanceStatus.DOWN){
+ dis.registerService(instance);
+ }
+ } catch (Exception e){
+ throw new IllegalStateException(e);
+ }
+
Review Comment:
has been changed to updateService()
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]