Add clean to context plugin

and don't delete local context unless the context is deleted by a user
This commit is contained in:
HirokiUchikawa
2018-05-30 15:23:34 +09:00
parent 7185bcd51f
commit f262348497
8 changed files with 260 additions and 107 deletions

View File

@@ -160,11 +160,12 @@ function setFlows(_config,type,muteLog,forceStart) {
activeFlowConfig = newFlowConfig;
if (forceStart || started) {
return stop(type,diff,muteLog).then(function() {
context.clean(activeFlowConfig);
start(type,diff,muteLog).then(function() {
events.emit("runtime-event",{id:"runtime-deploy",payload:{revision:flowRevision},retain: true});
return context.clean(activeFlowConfig).then(function() {
start(type,diff,muteLog).then(function() {
events.emit("runtime-event",{id:"runtime-deploy",payload:{revision:flowRevision},retain: true});
});
return flowRevision;
});
return flowRevision;
}).catch(function(err) {
})
} else {