Skip to content

Commit

Permalink
codeine-243 register peer in consul - changed to TCP health check
Browse files Browse the repository at this point in the history
  • Loading branch information
rezra3 committed Nov 18, 2018
1 parent 8f30317 commit 7611df5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/common/codeine/AbstractCodeineBootstrap.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ protected static void boot(String component, Class<? extends AbstractCodeineBoot
protected void registerInConsul(String name, int port) {
if (injector.getInstance(GlobalConfigurationJsonStore.class).get().consul_registration()) {
ConsulRegistrator consulRegistrator = injector.getInstance(ConsulRegistrator.class);
consulRegistrator.init();
if (consulRegistrator.consulExists()) {
consulRegistrator.register(name, port);
Runtime.getRuntime().addShutdownHook(new Thread(() -> deregisterFromConsul(name)));
Expand Down

0 comments on commit 7611df5

Please sign in to comment.