mirror of https://github.com/node-red/node-red.git
Add trace for who last started the stack
parent
bd57bce2d3
commit
884bbe01f0
|
@ -44,9 +44,11 @@ var activeNodesToFlow = {};
|
|||
|
||||
var typeEventRegistered = false;
|
||||
|
||||
let lastStarterStack
|
||||
|
||||
function init(runtime) {
|
||||
if (started) {
|
||||
throw new Error("Cannot init without a stop");
|
||||
throw new Error("Cannot init without a stop:" + lastStarterStack);
|
||||
}
|
||||
settings = runtime.settings;
|
||||
storage = runtime.storage;
|
||||
|
@ -274,7 +276,7 @@ async function start(type,diff,muteLog,isDeploy) {
|
|||
if (diff && diff.globalConfigChanged) {
|
||||
type = 'full'
|
||||
}
|
||||
|
||||
lastStarterStack = new Error('Flows started here').stack
|
||||
started = true;
|
||||
state = 'start'
|
||||
var i;
|
||||
|
@ -334,6 +336,7 @@ async function start(type,diff,muteLog,isDeploy) {
|
|||
log.info(log._("nodes.flows.stopped-flows"));
|
||||
events.emit("runtime-event",{id:"runtime-state",payload:{ state: 'stop', deploy:isDeploy },retain:true});
|
||||
state = 'stop'
|
||||
lastStarterStack = null
|
||||
started = false
|
||||
return
|
||||
}
|
||||
|
@ -454,6 +457,7 @@ function stop(type,diff,muteLog,isDeploy) {
|
|||
if (diff.globalConfigChanged) {
|
||||
type = 'full'
|
||||
}
|
||||
lastStarterStack = null
|
||||
started = false;
|
||||
state = 'stop'
|
||||
var promises = [];
|
||||
|
|
Loading…
Reference in New Issue