This commit is contained in:
Joshua Boniface 2018-06-01 00:58:37 -04:00
parent 2570d3c450
commit cfd4639630
2 changed files with 1 additions and 4 deletions

View File

@ -9,7 +9,7 @@ class NodeInstance(threading.Thread):
self.zkey = '/nodes/%s' % name self.zkey = '/nodes/%s' % name
self.zk = zk self.zk = zk
self.name = name self.name = name
self.state = 'stop' #self.state = 'stop'
self.stop_thread = threading.Event() self.stop_thread = threading.Event()
self.node_list = node_list self.node_list = node_list
self.domainlist = [] self.domainlist = []

View File

@ -76,12 +76,9 @@ def updatenodes(new_node_list):
for node in node_list: for node in node_list:
if node in t_node: if node in t_node:
t_node[node].updatenodelist(node_list) t_node[node].updatenodelist(node_list)
time.sleep(0.1)
else: else:
print("starting" + node)
t_node[node] = NodeInstance.NodeInstance(node, node_list, zk); t_node[node] = NodeInstance.NodeInstance(node, node_list, zk);
t_node[node].start() t_node[node].start()
time.sleep(0.1)
node_state = t_node[node].getstate() node_state = t_node[node].getstate()
print(node_state) print(node_state)