Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute script in parallel or serial #2612

Open
3 tasks done
mtrezza opened this issue Oct 15, 2024 · 1 comment
Open
3 tasks done

Execute script in parallel or serial #2612

mtrezza opened this issue Oct 15, 2024 · 1 comment
Labels
bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) type:feature New feature or improvement of existing feature

Comments

@mtrezza
Copy link
Member

mtrezza commented Oct 15, 2024

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.

Copy link

parse-github-assistant bot commented Oct 15, 2024

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

@mtrezza mtrezza added bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) type:feature New feature or improvement of existing feature and removed bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

1 participant