Commit 406f4572 authored by Vincent Pelletier's avatar Vincent Pelletier

Move packet creation out of loop.

It is not possible to move them out of container loop, as tid is a loop
variable.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2217 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent f4836f41
......@@ -134,13 +134,15 @@ class VerificationManager(BaseServiceHandler):
for tid in self._tid_set:
uuid_set = self.verifyTransaction(tid)
if uuid_set is None:
packet = Packets.DeleteTransaction(tid)
# Make sure that no node has this transaction.
for node in self.app.nm.getIdentifiedList():
if node.isStorage():
node.notify(Packets.DeleteTransaction(tid))
node.notify(packet)
else:
packet = Packets.CommitTransaction(tid)
for node in self.app.nm.getIdentifiedList(pool_set=uuid_set):
node.notify(Packets.CommitTransaction(tid))
node.notify(packet)
# If possible, send the packets now.
em.poll(0)
......
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