Force reeval of env vars if group/flow/global envs change

This commit is contained in:
Nick O'Leary
2023-07-10 12:04:52 +01:00
parent 3209777aba
commit 7481b78b16
3 changed files with 90 additions and 34 deletions

View File

@@ -271,6 +271,10 @@ function getFlows() {
async function start(type,diff,muteLog,isDeploy) {
type = type || "full";
if (diff && diff.globalConfigChanged) {
type = 'full'
}
started = true;
state = 'start'
var i;
@@ -441,6 +445,9 @@ function stop(type,diff,muteLog,isDeploy) {
log.info(log._("nodes.flows.stopping-flows"));
}
}
if (diff.globalConfigChanged) {
type = 'full'
}
started = false;
state = 'stop'
var promises = [];
@@ -464,7 +471,7 @@ function stop(type,diff,muteLog,isDeploy) {
activeFlowIds.forEach(id => {
if (activeFlows.hasOwnProperty(id)) {
var flowStateChanged = diff && (diff.added.indexOf(id) !== -1 || diff.removed.indexOf(id) !== -1);
var flowStateChanged = diff && (diff.changed.indexOf(id) !== -1 || diff.added.indexOf(id) !== -1 || diff.removed.indexOf(id) !== -1);
log.debug("red/nodes/flows.stop : stopping flow : "+id);
promises.push(activeFlows[id].stop(flowStateChanged?null:stopList,removedList));
if (type === "full" || flowStateChanged || diff.removed.indexOf(id)!==-1) {