Lower priority of mass workflow transition activity
We had an incident in a in instance were a user changed state of 70K invoices using https://www.erp5.com/howto/erp5-developer-howto/erp5-HowTo.Change.Workflow.State.Of.Multiple.Documents and leads to user not receiving the reports they requested. `Folder_modifyWorkflowStatus` creates a lot of `callMethodOnObjectList` activities (for all the selected documents) with priority 2, then these activities will cause more reindex an expand activities. Until all these `callMethodOnObjectList` are processed, no new activities with priority > 2 were processed. Some "important for users" activities such as erp5_deferred_style reports where waiting in the queue. I believe we should just set a lower priority to these `callMethodOnObjectList`, eventhough I considered a more clever way of giving the priority: - if the number of selected documents is reasonably small, process them with a very high priority, this way the user can see his document changing state almost immediately as when using the synchronous change state. This should not cause congestion because there are not too many documents. - when there are a lot of selected documents, process them with a very low priority, because anyway it will take time and user will not "wait" for documents to change state. ... but I realized this is trying to be too clever. So any objections to just lower priority here ? /reviewed-on nexedi/erp5!235
Showing
Please register or sign in to comment