From 41131eeae58206efda236ffb2493a36305fb0d31 Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Mon, 13 Aug 2007 09:49:11 +0000 Subject: [PATCH] replace hardcoded value, change priority git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15623 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/patches/DCWorkflow.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/product/ERP5Type/patches/DCWorkflow.py b/product/ERP5Type/patches/DCWorkflow.py index cf3fb921ba..e8d9cd6705 100644 --- a/product/ERP5Type/patches/DCWorkflow.py +++ b/product/ERP5Type/patches/DCWorkflow.py @@ -37,6 +37,8 @@ from zLOG import LOG from Products.DCWorkflow.WorkflowUIMixin import WorkflowUIMixin as WorkflowUIMixin_class from Products.DCWorkflow.Guard import Guard, _checkPermission, createExprContext, StateChangeInfo +ACTIVITY_GROUPING_COUNT = 100 + def WorkflowUIMixin_setProperties( self, title , description='' # the only addition to WorkflowUIMixin.setProperties , manager_bypass=0, props=None, REQUEST=None): @@ -513,10 +515,10 @@ def updateRoleMappings(self, REQUEST=None): object_list_len = len(object_list) portal_activities = self.portal_activities object_path_list = [x.path for x in object_list] - for i in xrange(0, object_list_len, 100): - current_path_list = object_path_list[i:i+100] + for i in xrange(0, object_list_len, ACTIVITY_GROUPING_COUNT): + current_path_list = object_path_list[i:i+ACTIVITY_GROUPING_COUNT] portal_activities.activate(activity='SQLQueue', - priority=5)\ + priority=3)\ .callMethodOnObjectList(current_path_list, 'updateRoleMappingsFor', wf_id = self.getId()) -- 2.30.9