Commit d8b339cf authored by Vincent Pelletier's avatar Vincent Pelletier

ERP5Catalog: Trivial improvement on _searchAndActivate.

parent dbfc4d98
...@@ -995,10 +995,10 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): ...@@ -995,10 +995,10 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
activate_kw, r[-1].getUid(), **kw) activate_kw, r[-1].getUid(), **kw)
r = [x.getPath() for x in r] r = [x.getPath() for x in r]
r.sort() r.sort()
activate = self.getPortalObject().portal_activities.activate activate = self.getPortalObject().portal_activities.activate(
activity='SQLQueue', **activate_kw).callMethodOnObjectList
for i in xrange(0, result_count, packet_size): for i in xrange(0, result_count, packet_size):
activate(activity='SQLQueue', **activate_kw).callMethodOnObjectList( activate(r[i:i+packet_size], method_id, *method_args, **method_kw)
r[i:i+packet_size], method_id, *method_args, **method_kw)
security.declarePublic('searchAndActivate') security.declarePublic('searchAndActivate')
def searchAndActivate(self, *args, **kw): def searchAndActivate(self, *args, **kw):
......
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