Use try when watching health value in NodeInstance
This commit is contained in:
parent
0b583bfdaf
commit
2c3a3cdf52
|
@ -225,6 +225,8 @@ class NodeInstance(object):
|
||||||
)
|
)
|
||||||
self.flush_thread.start()
|
self.flush_thread.start()
|
||||||
|
|
||||||
|
try:
|
||||||
|
|
||||||
@self.zkhandler.zk_conn.DataWatch(
|
@self.zkhandler.zk_conn.DataWatch(
|
||||||
self.zkhandler.schema.path("node.monitoring.health", self.name)
|
self.zkhandler.schema.path("node.monitoring.health", self.name)
|
||||||
)
|
)
|
||||||
|
@ -247,6 +249,9 @@ class NodeInstance(object):
|
||||||
if data != self.health:
|
if data != self.health:
|
||||||
self.health = data
|
self.health = data
|
||||||
|
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
@self.zkhandler.zk_conn.DataWatch(
|
@self.zkhandler.zk_conn.DataWatch(
|
||||||
self.zkhandler.schema.path("node.memory.free", self.name)
|
self.zkhandler.schema.path("node.memory.free", self.name)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue