Skip to content

Commit

Permalink
Merge pull request #56 from woehrl01/patch-18
Browse files Browse the repository at this point in the history
0003319: Stoping the engine on the main node via rest stops the whole system
  • Loading branch information
mmichalek committed Mar 7, 2018
2 parents 56e09f3 + f46740b commit d3df11c
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -1323,16 +1323,21 @@ public ResponseEntity<String> handleException(Exception ex) {
}

private void startImpl(ISymmetricEngine engine) {
engine.getParameterService().saveParameter(ParameterConstants.AUTO_START_ENGINE, "true", Constants.SYSTEM_USER);
org.jumpmind.symmetric.model.Node thisNode = engine.getNodeService().findIdentity();
if(thisNode != null) {
engine.getParameterService().saveParameter(thisNode.getExternalId(), thisNode.getNodeGroupId(), ParameterConstants.AUTO_START_ENGINE, "true", Constants.SYSTEM_USER);
}
if (!engine.start()) {
throw new InternalServerErrorException();
}
}

private void stopImpl(ISymmetricEngine engine) {
engine.stop();
engine.getParameterService().saveParameter(ParameterConstants.AUTO_START_ENGINE, "false", Constants.SYSTEM_USER);

org.jumpmind.symmetric.model.Node thisNode = engine.getNodeService().findIdentity();
if(thisNode != null) {
engine.getParameterService().saveParameter(thisNode.getExternalId(), thisNode.getNodeGroupId(), ParameterConstants.AUTO_START_ENGINE, "false", Constants.SYSTEM_USER);
}
}

private void syncTriggersImpl(ISymmetricEngine engine, boolean force) {
Expand Down

0 comments on commit d3df11c

Please sign in to comment.