Commit b9f52371 authored by Vincent Pelletier's avatar Vincent Pelletier

Factorise packet creation, as it uses loop invariants.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2096 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 39a5f877
...@@ -75,9 +75,10 @@ class ClientServiceHandler(MasterHandler): ...@@ -75,9 +75,10 @@ class ClientServiceHandler(MasterHandler):
# Request locking data. # Request locking data.
# build a new set as we may not send the message to all nodes as some # build a new set as we may not send the message to all nodes as some
# might be not reachable at that time # might be not reachable at that time
p = Packets.AskLockInformation(tid)
used_uuid_set = set() used_uuid_set = set()
for node in self.app.nm.getIdentifiedList(pool_set=uuid_set): for node in self.app.nm.getIdentifiedList(pool_set=uuid_set):
node.ask(Packets.AskLockInformation(tid), timeout=60) node.ask(p, timeout=60)
used_uuid_set.add(node.getUUID()) used_uuid_set.add(node.getUUID())
app.tm.prepare(tid, oid_list, used_uuid_set, conn.getPeerId()) app.tm.prepare(tid, oid_list, used_uuid_set, conn.getPeerId())
......
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