hey guys, we have built a solution where a UE scri...
# suitescript
v
hey guys, we have built a solution where a UE script on Sales Order triggers a scheduled script to do some heavy lifting tasks but in case there's heavy traffic on the webstore, we fear that the scheduled script might fail to execute what can be done to get around such a scenario?
s
You can create a new deployment of the script each time it is called. Then at the end of the process, have the script set its deployment to 'undeployed' and have a follow-up process which goes behind and deletes those successfully executed deployments.
s
@battk In their scenario, they are trying to schedule the same deployment. I am suggesting the UE creates a deployment and schedules it to run immediately.
v
@suitedev I think this would work perfectly, weird that we never thought of this. 🙂
s
1. create deployment for SS or M/R
YES, it is AWESOME
and no mess.
!
@Viraj Shinde When you schedule the process, you have to pass the internal id of the script deployment through as a parameter so it can submit the undeployment for itself.
v
@suitedev Noted. 👍
Thank you @suitedev, that really helps
👍🏼 1
s
I was pretty excited about this when I first developed it.. !! solves a lot of complexity and it's reliable.
💯 1
e
Depending on the scenario, I usually just have the UE check a box on the record that is “pending update”, then have a map/reduce process all records pending update