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

master: remove useless 'selector' argument of broadcastPartitionChanges

parent 30a228b3
...@@ -251,20 +251,16 @@ class Application(object): ...@@ -251,20 +251,16 @@ 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
if not selector:
selector = lambda n: n.isClient() or n.isStorage() or n.isAdmin()
self.pt.log() self.pt.log()
ptid = self.pt.setNextID() ptid = self.pt.setNextID()
packet = Packets.NotifyPartitionChanges(ptid, cell_list) packet = Packets.NotifyPartitionChanges(ptid, cell_list)
for node in self.nm.getIdentifiedList(): for node in self.nm.getIdentifiedList():
if not node.isRunning(): # TODO: notify masters
continue if node.isRunning() and not node.isMaster():
if selector(node):
node.notify(packet) 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