I am submitting a MR script from itself again from...
# suitescript
n
I am submitting a MR script from itself again from the summarize stage. It is throwing an error about no active deployments. But API document says otherwise: "_Additionally, note that a map/reduce script can be submitted for processing only if there is no unfinished map/reduce script task for the same script ID and script deployment ID. For this reason, if a map/reduce script resubmits itself, the resubmit does not occur until the current execution completes. This delay is necessary to avoid the existence of two unfinished tasks for the same deployment of the same script. Therefore, if a map/reduce script uses the submit() method to resubmit itself, then at runtime, no task ID is returned when the map/reduce script is submitted._ " Is my understanding incorrect?
b
what does your code look like
n
Copy code
var script = runtime.getCurrentScript();
var mrTask = task.create({taskType: task.TaskType.MAP_REDUCE, scriptId: script.id});

mrTask.submit();
or do I need to provide deployment ID as well?
b
you cant make the deployment reschedule itself otherwise
n
Understood. Thank you @battk