Commit a5370ef7 authored by Vincent Pelletier's avatar Vincent Pelletier

ERP5Type.Core.Folder.recurseCallMethod: Allow spawning activities on SQLDict.

For when redundant activities may be skipped.
parent 87a8f5be
...@@ -449,6 +449,7 @@ class FolderMixIn(ExtensionClass.Base): ...@@ -449,6 +449,7 @@ class FolderMixIn(ExtensionClass.Base):
activate_kw = self.getDefaultActivateParameterDict.im_func(None) activate_kw = self.getDefaultActivateParameterDict.im_func(None)
activate_kw.update(kw.get('activate_kw', ())) activate_kw.update(kw.get('activate_kw', ()))
activate_kw.setdefault('active_process', None) activate_kw.setdefault('active_process', None)
activate_kw.setdefault('activity', 'SQLQueue')
activate = self.getPortalObject().portal_activities.activateObject activate = self.getPortalObject().portal_activities.activateObject
validate = restricted and getSecurityManager().validate validate = restricted and getSecurityManager().validate
cost = activate_kw.setdefault('group_method_cost', .034) # 30 objects cost = activate_kw.setdefault('group_method_cost', .034) # 30 objects
...@@ -508,7 +509,7 @@ class FolderMixIn(ExtensionClass.Base): ...@@ -508,7 +509,7 @@ class FolderMixIn(ExtensionClass.Base):
del next_id[0] del next_id[0]
if min_depth <= depth: if min_depth <= depth:
check_limit() check_limit()
getattr(activate(container, 'SQLQueue', **getActivateKw(container, recurse_activate_kw)), getattr(activate(container, **getActivateKw(container, recurse_activate_kw)),
method_id)(*method_args, **method_kw) method_id)(*method_args, **method_kw)
del recurse_stack[depth:] del recurse_stack[depth:]
try: try:
...@@ -517,7 +518,8 @@ class FolderMixIn(ExtensionClass.Base): ...@@ -517,7 +518,8 @@ class FolderMixIn(ExtensionClass.Base):
if hook_raised: if hook_raised:
raise raise
activate_kw['group_method_id'] = kw['group_id'] = '' # no grouping activate_kw['group_method_id'] = kw['group_id'] = '' # no grouping
activate(self, 'SQLQueue', **activate_kw)._recurseCallMethod( activate_kw['activity'] = 'SQLQueue'
activate(self, **activate_kw)._recurseCallMethod(
method_id, method_args, method_kw, restricted=restricted, **kw) method_id, method_args, method_kw, restricted=restricted, **kw)
security.declarePublic('recurseCallMethod') security.declarePublic('recurseCallMethod')
......
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