Untitled.js
# suitescript
r
Untitled.js
I've scraped our entire Coupa database and stored POs as JSON objects (also attachments). After a lot of testing I decided on creating 50 POs at a time to avoid governance limitations. I wrote the following script to automate copying deployments and submitting scheduled tasks. I'm getting
Failed to submit job request: INPROGRESS
.
Example task values:
{scriptId: "1491", deploymentId: "CUSTOMDEPLOY_ONDEMAND"}
Ah, I was looking at the deployment creator script instead of the script I'm trying to run. It was indeed in progress.
b
my vote is 1 map/reduce deployment to process 50 pos instead of 50 scheduled scripts to process 1 each
r
the scheduled script runs 50 each. i need sequential logs because i'm expecting failures. i'm activating and creating employees, departments, and vendors. it's gonna be a mess
b
you dont need to do concurrency on map/reduce scripts
r
i'm not talking about concurrency. shuffling makes it so that i can't easily resume the process from where it failed. with a scheduled script i can see that last PO that was created based on logs, skip the PO that failed and resume with the next PO in the sequence. given the vast array of places this script can fail and the size of the data set, this is useful
👍 1
or fix the bug and start from the failure...
b
despite the name, shuffling isnt random
you are in control of the order the results will be processed in
r
im not debating you. im saying i cannot rely on the order of logs to know where the script failed. im doing it this way whether you like it or not lol