Commit 971e2764 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Reduce indentation before changes.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1730 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 88ba1212
...@@ -521,25 +521,24 @@ class Application(object): ...@@ -521,25 +521,24 @@ class Application(object):
continue continue
if self.cluster_state == ClusterStates.RUNNING: if self.cluster_state == ClusterStates.RUNNING:
sys.exit("Application has been asked to shut down") sys.exit("Application has been asked to shut down")
else: # no more transaction, ask clients to shutdown
# no more transaction, ask clients to shutdown logging.info("asking all clients to shutdown")
logging.info("asking all clients to shutdown") for c in self.em.getConnectionList():
for c in self.em.getConnectionList(): node = self.nm.getByUUID(c.getUUID())
node = self.nm.getByUUID(c.getUUID()) if node.isClient():
if node.isClient(): node_list = [(node.getType(), node.getAddress(),
node_list = [(node.getType(), node.getAddress(), node.getUUID(), NodeStates.DOWN)]
node.getUUID(), NodeStates.DOWN)] c.notify(Packets.NotifyNodeInformation(node_list))
c.notify(Packets.NotifyNodeInformation(node_list)) # then ask storages and master nodes to shutdown
# then ask storages and master nodes to shutdown logging.info("asking all remaining nodes to shutdown")
logging.info("asking all remaining nodes to shutdown") for c in self.em.getConnectionList():
for c in self.em.getConnectionList(): node = self.nm.getByUUID(c.getUUID())
node = self.nm.getByUUID(c.getUUID()) if node.isStorage() or node.isMaster():
if node.isStorage() or node.isMaster(): node_list = [(node.getType(), node.getAddress(),
node_list = [(node.getType(), node.getAddress(), node.getUUID(), NodeStates.DOWN)]
node.getUUID(), NodeStates.DOWN)] c.notify(Packets.NotifyNodeInformation(node_list))
c.notify(Packets.NotifyNodeInformation(node_list)) # then shutdown
# then shutdown sys.exit("Cluster has been asked to shut down")
sys.exit("Cluster has been asked to shut down")
def identifyStorageNode(self, uuid, node): def identifyStorageNode(self, uuid, node):
state = NodeStates.RUNNING state = NodeStates.RUNNING
......
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