[Neo-report] r2039 vincent - /trunk/neo/client/app.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Apr 28 17:05:13 CEST 2010


Author: vincent
Date: Wed Apr 28 17:05:12 2010
New Revision: 2039

Log:
Factorise packet creation.

Modified:
    trunk/neo/client/app.py

Modified: trunk/neo/client/app.py
==============================================================================
--- trunk/neo/client/app.py [iso-8859-1] (original)
+++ trunk/neo/client/app.py [iso-8859-1] Wed Apr 28 17:05:12 2010
@@ -725,6 +725,7 @@
         # ignore the outcome: we are going to abort anyway.
         self.waitResponses()
 
+        tid = self.local_var.tid
         cell_set = set()
         # select nodes where objects were stored
         for oid in self.local_var.data_dict.iterkeys():
@@ -733,16 +734,17 @@
         cell_set |= set(self._getCellListForTID(self.local_var.tid,
             writable=True))
 
+        p = Packets.AbortTransaction(tid)
         # cancel transaction one all those nodes
         for cell in cell_set:
             conn = self.cp.getConnForCell(cell)
             if conn is None:
                 continue
-            conn.notify(Packets.AbortTransaction(self.local_var.tid))
+            conn.notify(p)
 
         # Abort the transaction in the primary master node.
         conn = self._getMasterConnection()
-        conn.notify(Packets.AbortTransaction(self.local_var.tid))
+        conn.notify(p)
         self.local_var.clear()
 
     @profiler_decorator





More information about the Neo-report mailing list