Commit 41131eea authored by Nicolas Delaby's avatar Nicolas Delaby

replace hardcoded value, change priority

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15623 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 181b0ddb
...@@ -37,6 +37,8 @@ from zLOG import LOG ...@@ -37,6 +37,8 @@ from zLOG import LOG
from Products.DCWorkflow.WorkflowUIMixin import WorkflowUIMixin as WorkflowUIMixin_class from Products.DCWorkflow.WorkflowUIMixin import WorkflowUIMixin as WorkflowUIMixin_class
from Products.DCWorkflow.Guard import Guard, _checkPermission, createExprContext, StateChangeInfo from Products.DCWorkflow.Guard import Guard, _checkPermission, createExprContext, StateChangeInfo
ACTIVITY_GROUPING_COUNT = 100
def WorkflowUIMixin_setProperties( self, title def WorkflowUIMixin_setProperties( self, title
, description='' # the only addition to WorkflowUIMixin.setProperties , description='' # the only addition to WorkflowUIMixin.setProperties
, manager_bypass=0, props=None, REQUEST=None): , manager_bypass=0, props=None, REQUEST=None):
...@@ -513,10 +515,10 @@ def updateRoleMappings(self, REQUEST=None): ...@@ -513,10 +515,10 @@ def updateRoleMappings(self, REQUEST=None):
object_list_len = len(object_list) object_list_len = len(object_list)
portal_activities = self.portal_activities portal_activities = self.portal_activities
object_path_list = [x.path for x in object_list] object_path_list = [x.path for x in object_list]
for i in xrange(0, object_list_len, 100): for i in xrange(0, object_list_len, ACTIVITY_GROUPING_COUNT):
current_path_list = object_path_list[i:i+100] current_path_list = object_path_list[i:i+ACTIVITY_GROUPING_COUNT]
portal_activities.activate(activity='SQLQueue', portal_activities.activate(activity='SQLQueue',
priority=5)\ priority=3)\
.callMethodOnObjectList(current_path_list, .callMethodOnObjectList(current_path_list,
'updateRoleMappingsFor', 'updateRoleMappingsFor',
wf_id = self.getId()) wf_id = self.getId())
......
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