mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Prevent needless retention of node status messages
This commit is contained in:
@@ -18,6 +18,7 @@ const clone = require("clone");
|
||||
const Flow = require('./Flow').Flow;
|
||||
const context = require('../nodes/context');
|
||||
const util = require("util");
|
||||
const events = require("../events");
|
||||
|
||||
const redUtil = require("@node-red/util").util;
|
||||
const flowUtil = require("./util");
|
||||
@@ -308,7 +309,26 @@ class Subflow extends Flow {
|
||||
super.start(diff);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop this subflow.
|
||||
* The `stopList` argument helps define what needs to be stopped in the case
|
||||
* of a modified-nodes/flows type deploy.
|
||||
* @param {[type]} stopList [description]
|
||||
* @param {[type]} removedList [description]
|
||||
* @return {[type]} [description]
|
||||
*/
|
||||
stop(stopList, removedList) {
|
||||
const nodes = Object.keys(this.activeNodes);
|
||||
return super.stop(stopList, removedList).then(res => {
|
||||
nodes.forEach(id => {
|
||||
events.emit("node-status",{
|
||||
id: id
|
||||
});
|
||||
})
|
||||
return res;
|
||||
})
|
||||
|
||||
}
|
||||
/**
|
||||
* Get environment variable of subflow
|
||||
* @param {String} name name of env var
|
||||
|
Reference in New Issue
Block a user