We're taking a bunch of scheduled resource allocat...
# suitescript
r
We're taking a bunch of scheduled resource allocation scripts offline because everything has slowed to a crawl. I have a MR script that updates project resources and branches into another MR deployment for each project task, then copies the resources to each task. I'm starting to get concerned with concurrency. I chose to throw an error to the user when there are more than 30 tasks. I know on the fly deployments are possible but there are some really ugly use cases where users are creating a task for each case so we have a few projects with like 300 tasks. Generally we're trying to convince users to use native NetSuite behavior (avoiding automated resource allocation by opening everything up). We have a few hold outs who insist on the process they're using. Does anyone have any general advice about MR branching and handling concurrency? This is all new to me
Currently I'm using concurrency=2, two update project MR deployments, 60 update task MR deployments.
This would mean the update project scripts could fire, two at the same time, then they would be competing for the 60 task deployments
j
You say that your code "branches into another MR deployment for each project task", why don't you just handle all of the project tasks within one M/R script?
r
This list of resources is prohibitively long. It can't be sent to the map stage. I'm sending {"projectID": ####, "resourceID", ####} currently.
then {"taskID": ####, "resourceID", ####} in the map stage of the task script.
j
When you mean it can't be sent to the map stage do you mean it errors due to data size? I would think it should be possible in some way, perhaps saving the data to a temp file in the file cabinet and then deleting all the files in the summary stage?
r
If I try and return the list of resources to the map stage, it truncates the string and errors out.
That sounds possible.
j
Ah I've never heard of strings being truncated in Map stages. Another alternative would be to pass through IDs to your map stage that would allow you to acquire the data in the map stage.