Execute script in parallel or serial
New Feature / Enhancement Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am not just asking a question.
- [x] I have searched through existing issues.
Current Limitation
https://github.com/parse-community/parse-dashboard/pull/2508 added the script execution feature for selected rows. When selecting multiple objects, the objects are processed in serial. In some cases (depending on the script), the script for each object should be executed in parallel to speed up the processing time.
Feature / Enhancement Description
Add an optional option to the script that sets a batch size, which means multiple selected objects will be executed in parallel in batches.
Example Use Case
"apps": [
{
"scripts": [
{
"title": "Delete Account",
"classes": ["_User"],
"cloudCodeFunction": "deleteAccount",
"showConfirmationDialog": true,
"confirmationDialogStyle": "critical",
// Optional option that run a script on multiple objects in batches of size 20
"executionBatchSize": 20
}
]
}
]
When selecting 200 objects that means 10 batches will run in serial, while in each batch 20 objects will be processed in parallel.
Alternatives
The batch size processing should ideally happen server side as it's more versatile. That would require to send over the list of selected objects instead of sending a single object to the script.
🚀 Thanks for opening this issue! We are excited about your ideas for improvement!
Hi Can i work on this?
@RaghavArora14 Sure, I see you have asked also on other issues. In general you don't have to ask. If there is no active pull request for an issue then it's up for grabs. Just make sure you publish and link your pull request to this issue, so others know you are actively working on it. See also BOUNTY.
@RaghavArora14 This is still up for grabs, if you are interested.
🎉 This change has been released in version 7.2.0-alpha.9
🎉 This change has been released in version 7.2.0