Commit 1af3e662 authored by Jérome Perrin's avatar Jérome Perrin

Mass Workflow Action: prevent the default 1000 limit

parent 8493bb16
...@@ -114,6 +114,7 @@ selection_uid_list = portal.portal_selections.getSelectionCheckedUidsFor(selecti ...@@ -114,6 +114,7 @@ selection_uid_list = portal.portal_selections.getSelectionCheckedUidsFor(selecti
selection_params = portal.portal_selections.getSelectionParamsFor(selection_name).copy()\n selection_params = portal.portal_selections.getSelectionParamsFor(selection_name).copy()\n
selection_params[choosen_action[\'state_var\']] = choosen_action[\'workflow_state\']\n selection_params[choosen_action[\'state_var\']] = choosen_action[\'workflow_state\']\n
selection_params[\'portal_type\'] = choosen_action[\'portal_type\']\n selection_params[\'portal_type\'] = choosen_action[\'portal_type\']\n
selection_params[\'limit\'] = None\n
if selection_uid_list:\n if selection_uid_list:\n
selection_params[\'uid\'] = selection_uid_list\n selection_params[\'uid\'] = selection_uid_list\n
\n \n
...@@ -121,7 +122,7 @@ path_list = [brain.path for brain in\n ...@@ -121,7 +122,7 @@ path_list = [brain.path for brain in\n
portal.portal_selections.callSelectionFor(selection_name, params=selection_params)]\n portal.portal_selections.callSelectionFor(selection_name, params=selection_params)]\n
\n \n
batch_size = 100 # XXX\n batch_size = 100 # XXX\n
priority = 2 # XXX \n priority = 2 # XXX\n
path_list_len = len(path_list)\n path_list_len = len(path_list)\n
\n \n
for i in xrange(0, path_list_len, batch_size):\n for i in xrange(0, path_list_len, batch_size):\n
......
41049 41050
\ No newline at end of file \ No newline at end of file
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