Skip to content

Execute script in parallel or serial #2612

Open
@mtrezza

Description

@mtrezza

New Feature / Enhancement Checklist

Current Limitation

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bounty:$20Bounty applies for fixing this issue (Parse Bounty Program)type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions