Commit 93f5b0d8 authored by Julien Muchembled's avatar Julien Muchembled

threaded: expose a method to stop a A/M/S node

parent e57b1bdd
...@@ -329,6 +329,9 @@ class ServerNode(Node): ...@@ -329,6 +329,9 @@ class ServerNode(Node):
except AttributeError: except AttributeError:
raise ConnectorException raise ConnectorException
def stop(self):
self.em.wakeup(True)
class AdminApplication(ServerNode, neo.admin.app.Application): class AdminApplication(ServerNode, neo.admin.app.Application):
pass pass
...@@ -711,7 +714,7 @@ class NEOCluster(object): ...@@ -711,7 +714,7 @@ class NEOCluster(object):
client is None or self.__dict__.pop("db", client).close() client is None or self.__dict__.pop("db", client).close()
node_list = self.admin_list + self.storage_list + self.master_list node_list = self.admin_list + self.storage_list + self.master_list
for node in node_list: for node in node_list:
node.em.wakeup(True) node.stop()
try: try:
node_list.append(client.poll_thread) node_list.append(client.poll_thread)
except AttributeError: # client is None or thread is already stopped except AttributeError: # client is None or thread is already stopped
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment