hi, is there a trick to kill the execution of a M/...
# suitescript
d
hi, is there a trick to kill the execution of a M/R script?
k
@depthless at what stage are you trying to kill the script? Is is during getInputData, Map or Reduce Stage? Is this a one time request or re-occuring?
d
i actually made it happen!
@alien4u helped
thanks
j
For those who are interested, you can set the script to inactive. Then, you have to wait a few minutes.
I don’t know if there is another way.
a
@jen Previously it was possible to delete the entire record(including deployment) but NetSuite fixed that. Another way is updating the script file and inserting some lines(I dont remember from the top of my head) but that one takes longer, if I remember correctly until the script yield or something like that. So making the script inactive is the faster/most efficient way.
k
@alien4u that was going to be my suggestion. (Deletion of the entire record)
b
The way I handle this is to create a cache entry using the 'N/cache' module (ie. customerMapReduceStatus = true) . In the map or reduce stage read that variable from cache. if the variable is false, skip the rest of the processing. I use a snippet in the chrome debugging console to change the value if I need to abort the script. I should create a tiny suitelet to manipulate the cache variables.... The last time I checked, I did not see a way to list all the current variables in the cache. This makes it less dynamic.