is there a way to cancel a map reduce script form ...
# suitescript
g
is there a way to cancel a map reduce script form running
m
No, you have to wait. If there is an infinite loop or any other problem it will be stopped automatically by NS when it reaches its governance unit limit
there is a time limit also i guess
g
It is delete more custom records than intended
s
I have had some success inactivating the script / script deployment -- but you still gotta wait
g
the yield is 60 min
n
undeploy the script
s
a trick you can use is to put a killswitch script param in, then have your script periodically check for that script param value.
👍 1
e.g. a bolean script param named 'abort' or whatnot, and if true, you have the function immediately return(doing nothing), which should quickly make it go through remaining results and exit gracefully.
I suppose it works similarly to undeploying but you have more granular control
g
Looks like it did only delete the records i wanted, i got scared because when doing a SuiteQL query for that table i was getting 0 results while the map/reduce script was running.
I wonder if there is a Transaction lock on the table while the script is running that did not let me see all of the records In any case i will double check before running again that was a big scare
s
I might add that General Kenobi could surely stop a M/R script instantly with mind power.
or The Force, or something
g
It is an energy field and something more. An aura that at once controls and obeys. It is a nothingness that can accomplish miracles.