Commit f5a7c859 authored by Vincent Pelletier's avatar Vincent Pelletier

Factorise some lookups.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2162 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent ee447665
......@@ -766,17 +766,19 @@ class Application(object):
return
tid = self.local_var.tid
getCellListForOID = self._getCellListForOID
# select nodes where transaction was stored
cell_set = set(self._getCellListForTID(tid,
writable=True))
# select nodes where objects were stored
for oid in self.local_var.data_dict.iterkeys():
cell_set |= set(self._getCellListForOID(oid, writable=True))
cell_set |= set(getCellListForOID(oid, writable=True))
p = Packets.AbortTransaction(tid)
getConnForCell = self.cp.getConnForCell
# cancel transaction one all those nodes
for cell in cell_set:
conn = self.cp.getConnForCell(cell)
conn = getConnForCell(cell)
if conn is None:
continue
conn.notify(p)
......
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