Partial deploy with missing type breaks flow diff

Another refactor of Flow lifecycle.
 - diffFlow made a private static function
 - applyConfig now diffConfig - which returns a diff object that
   can be passed to .stop/.start to be properly applied
This commit is contained in:
Nick O'Leary
2015-03-13 17:54:58 +00:00
parent af20f3df64
commit f77dd06e65
3 changed files with 844 additions and 370 deletions

View File

@@ -123,7 +123,7 @@ var flowNodes = module.exports = {
return credentialSavePromise
.then(function() { return storage.saveFlows(cleanConfig);})
.then(function() {
var configDiff = activeFlow.applyConfig(config,type);
var configDiff = activeFlow.diffConfig(config,type);
return flowNodes.stopFlows(configDiff).then(function() {
activeFlow.parseConfig(config);
flowNodes.startFlows(configDiff);