Commit e27a2a69 authored by Aurel's avatar Aurel

when asking master node to shutdown, answer with notify node

information message to admin node


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@666 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent bf3b80b2
......@@ -573,9 +573,13 @@ class ServiceEventHandler(MasterEventHandler):
conn.answer(p, packet)
return
else:
p = protocol.answerNodeState(app.uuid, state)
conn.answer(p, packet)
# I was asked to shutdown
node.setState(state)
ip, port = node.getServer()
node_list = [(node.getNodeType(), ip, port, node.getUUID(), node.getState()),]
conn.answer(protocol.notifyNodeInformation(node_list), packet)
app.shutdown()
node = app.nm.getNodeByUUID(uuid)
if node is None:
p = protocol.protocolError('invalid uuid')
......
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