Stupid question: Has NetSuite added a way to kill ...
# suitescript
k
Stupid question: Has NetSuite added a way to kill runaway map/reduce scripts yet?
e
I know this doesn't help you this time but- Someone gave this tip before... maybe @stalbert or @battk(?) Always add a parameter check box called something like "STOP" to your M/R scripts. And then in your script do a check of that parameter, and if STOP == true then just return out. So if you start a M/R script then want to stop it, you can just open the depoloyment and check the "STOP" checkbox and save. This has saved me many hours.
@kwood
b
probably stalbert. checking script parameters usually means understanding how netsuite caches script parameters
i usually wouldnt recommend a solution that requires understanding netsuite quirks
k
I didn't see this until after I posted outside the thread. TL:DR, you can't kill it through the NS UI on the script or deployment records, but you CAN kill it by editing the script file in the file cabinet
b
your options for stopping the map/reduce were
Copy code
You may perform any of the following actions to stop the Map/Reduce script from running:
- Forced the script to error.
- Set the script to inactive.
- Undeploy the script.
the action available to you basically depends on which stage is stuck
k
It was stuck after queueing up all the maps
so inactivate and undeploy didn't work