[Erp5-report] r15623 - /erp5/trunk/products/ERP5Type/patches/DCWorkflow.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Aug 13 11:49:11 CEST 2007


Author: nicolas
Date: Mon Aug 13 11:49:11 2007
New Revision: 15623

URL: http://svn.erp5.org?rev=15623&view=rev
Log:
replace hardcoded value, change priority

Modified:
    erp5/trunk/products/ERP5Type/patches/DCWorkflow.py

Modified: erp5/trunk/products/ERP5Type/patches/DCWorkflow.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/DCWorkflow.py?rev=15623&r1=15622&r2=15623&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/DCWorkflow.py (original)
+++ erp5/trunk/products/ERP5Type/patches/DCWorkflow.py Mon Aug 13 11:49:11 2007
@@ -36,6 +36,8 @@
 # Patch WorkflowUIMixin to add description on workflows
 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
@@ -513,10 +515,10 @@
   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())




More information about the Erp5-report mailing list