Open yangruihaha opened 10 years ago
//..... $this->zk = new Zookeeper(hostname); $service_list = $this->zk ->getChildren("/XXX"); for ($i=0; $i < count($service_list); $i++) { if($this->zk ->exists("/XXX/".$service_list[$i])){ $app_status_json = $this->zk->get("/XXX/".$service_list[$i]); //..... } }
The get() will fail when the loop count grows.
Would you try newest version?
//..... $this->zk = new Zookeeper(hostname); $service_list = $this->zk ->getChildren("/XXX"); for ($i=0; $i < count($service_list); $i++) { if($this->zk ->exists("/XXX/".$service_list[$i])){ $app_status_json = $this->zk->get("/XXX/".$service_list[$i]); //..... } }
The get() will fail when the loop count grows.