I am creating a task for an MR script which is be...
# suitescript
v
I am creating a task for an MR script which is being submitted in the another MR script , now i get this error {"type":"error.SuiteScriptError","name":"MAP_REDUCE_ALREADY_RUNNING","message":"Map/Reduce Script 173 with Deployment 1 is already running and cannot be started until it has completed. what should i do now?
c
r
You want to create a module that copies an existing deployment whenever all deployments are busy. It's a common MR problem that NS should really just implement natively. Same with the error handling piece. Unspeakably common use case
Otherwise you have to create an arbitrary number of deployments and hope for the best.
I'll race you
Thanks to @mattdahse for showing me how to do this originally.
First try not using the deployment ID when creating the task. It will automatically use any available deployment.