Commit 930af0fb authored by Julien Muchembled's avatar Julien Muchembled

master: remove useless 'selector' argument of broadcastPartitionChanges

parent 30a228b3
...@@ -251,21 +251,17 @@ class Application(object): ...@@ -251,21 +251,17 @@ class Application(object):
if node_list and node.isRunning(): if node_list and node.isRunning():
node.notify(Packets.NotifyNodeInformation(node_list)) node.notify(Packets.NotifyNodeInformation(node_list))
def broadcastPartitionChanges(self, cell_list, selector=None): def broadcastPartitionChanges(self, cell_list):
"""Broadcast a Notify Partition Changes packet.""" """Broadcast a Notify Partition Changes packet."""
logging.debug('broadcastPartitionChanges') logging.debug('broadcastPartitionChanges')
if not cell_list: if cell_list:
return self.pt.log()
if not selector: ptid = self.pt.setNextID()
selector = lambda n: n.isClient() or n.isStorage() or n.isAdmin() packet = Packets.NotifyPartitionChanges(ptid, cell_list)
self.pt.log() for node in self.nm.getIdentifiedList():
ptid = self.pt.setNextID() # TODO: notify masters
packet = Packets.NotifyPartitionChanges(ptid, cell_list) if node.isRunning() and not node.isMaster():
for node in self.nm.getIdentifiedList(): node.notify(packet)
if not node.isRunning():
continue
if selector(node):
node.notify(packet)
def provideService(self): def provideService(self):
""" """
......
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