parse-dashboard icon indicating copy to clipboard operation
parse-dashboard copied to clipboard

Execute script in parallel or serial

Open mtrezza opened this issue 1 year ago • 1 comments

New Feature / Enhancement Checklist

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.

mtrezza avatar Oct 15 '24 00:10 mtrezza

🚀 Thanks for opening this issue! We are excited about your ideas for improvement!

Hi Can i work on this?

RaghavArora14 avatar Feb 22 '25 18:02 RaghavArora14

@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.

mtrezza avatar Feb 23 '25 01:02 mtrezza

@RaghavArora14 This is still up for grabs, if you are interested.

mtrezza avatar May 26 '25 10:05 mtrezza

🎉 This change has been released in version 7.2.0-alpha.9

parseplatformorg avatar May 27 '25 12:05 parseplatformorg

🎉 This change has been released in version 7.2.0

parseplatformorg avatar Jun 01 '25 15:06 parseplatformorg