Add node context/flow/global

This commit is contained in:
Nick O'Leary
2015-12-29 22:16:51 +00:00
parent b95dc2ecce
commit 5ead3342cc
6 changed files with 203 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ var when = require("when");
var Flow = require('./Flow');
var typeRegistry = require("../registry");
var context = require("../context")
var credentials = require("../credentials");
var flowUtil = require("./util");
@@ -116,6 +117,7 @@ function setConfig(_config,type,muteLog) {
return credentials.clean(activeConfig).then(function() {
if (started) {
return stop(type,diff,muteLog).then(function() {
context.clean(activeFlowConfig);
start(type,diff,muteLog);
}).otherwise(function(err) {
})

View File

@@ -158,7 +158,7 @@ module.exports = {
changed[removed[id].z] = newConfig.allNodes[removed[id].z];
if (changed[removed[id].z].type === "subflow") {
changedSubflows[removed[id].z] = changed[removed[id].z];
delete removed[id];
//delete removed[id];
}
}
} else {