From 0c2be73a880ca512923e12dc21e31c4b4cfe3055 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 22 Mar 2024 15:59:55 +0000 Subject: [PATCH] Add more debug --- packages/node_modules/@node-red/runtime/lib/flows/index.js | 4 ++-- packages/node_modules/@node-red/runtime/lib/index.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/node_modules/@node-red/runtime/lib/flows/index.js b/packages/node_modules/@node-red/runtime/lib/flows/index.js index 2273e8b89..46406c68c 100644 --- a/packages/node_modules/@node-red/runtime/lib/flows/index.js +++ b/packages/node_modules/@node-red/runtime/lib/flows/index.js @@ -271,12 +271,12 @@ function getFlows() { return activeConfig; } -async function start(type,diff,muteLog,isDeploy) { +async function start(type,diff,muteLog,isDeploy, traceError) { type = type || "full"; if (diff && diff.globalConfigChanged) { type = 'full' } - lastStarterStack = new Error('Flows started here').stack + lastStarterStack = traceError || new Error('Flows started here').stack started = true; state = 'start' var i; diff --git a/packages/node_modules/@node-red/runtime/lib/index.js b/packages/node_modules/@node-red/runtime/lib/index.js index 39b2025c5..68790e52b 100644 --- a/packages/node_modules/@node-red/runtime/lib/index.js +++ b/packages/node_modules/@node-red/runtime/lib/index.js @@ -131,6 +131,7 @@ function getVersion() { * @memberof @node-red/runtime */ function start() { + const startedCaller = new Error('runtime/lib/index.start started here').stack return i18n.registerMessageCatalog("runtime",path.resolve(path.join(__dirname,"..","locales")),"runtime.json") .then(function() { return storage.init(runtime)}) .then(function() { return settings.load(storage)}) @@ -233,7 +234,7 @@ function start() { } } return redNodes.loadContextsPlugin().then(function () { - redNodes.loadFlows().then(() => { redNodes.startFlows() }).catch(function(err) {}); + redNodes.loadFlows().then(() => { redNodes.startFlows(null, null, null, null, startedCaller) }).catch(function(err) {}); started = true; }); });