Commit e0054ef6 authored by Vincent Pelletier's avatar Vincent Pelletier

Factorise history packet creation.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2567 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 61679572
...@@ -1208,6 +1208,7 @@ class Application(object): ...@@ -1208,6 +1208,7 @@ class Application(object):
cell_list = self._getCellListForOID(oid, readable=True) cell_list = self._getCellListForOID(oid, readable=True)
shuffle(cell_list) shuffle(cell_list)
cell_list.sort(key=self.cp.getCellSortKey) cell_list.sort(key=self.cp.getCellSortKey)
packet = Packets.AskObjectHistory(oid, 0, size)
for cell in cell_list: for cell in cell_list:
# FIXME: we keep overwriting self.local_var.history here, we # FIXME: we keep overwriting self.local_var.history here, we
# should aggregate it instead. # should aggregate it instead.
...@@ -1217,7 +1218,7 @@ class Application(object): ...@@ -1217,7 +1218,7 @@ class Application(object):
self.local_var.history = None self.local_var.history = None
try: try:
self._askStorage(conn, Packets.AskObjectHistory(oid, 0, size)) self._askStorage(conn, packet)
except ConnectionClosed: except ConnectionClosed:
continue continue
......
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