Commit bc5f60d3 authored by Vincent Pelletier's avatar Vincent Pelletier

Factorise packet creation.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2627 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent d193d610
...@@ -1132,11 +1132,12 @@ class Application(object): ...@@ -1132,11 +1132,12 @@ class Application(object):
self.local_var.node_tids = {} self.local_var.node_tids = {}
queue = self.local_var.queue queue = self.local_var.queue
packet = Packets.AskTIDs(first, last, INVALID_PARTITION)
for storage_node in storage_node_list: for storage_node in storage_node_list:
conn = self.cp.getConnForNode(storage_node) conn = self.cp.getConnForNode(storage_node)
if conn is None: if conn is None:
continue continue
conn.ask(Packets.AskTIDs(first, last, INVALID_PARTITION), queue=queue) conn.ask(packet, queue=queue)
# Wait for answers from all storages. # Wait for answers from all storages.
self.waitResponses() self.waitResponses()
......
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