Skip to content

Commit

Permalink
fix broken healhchecks (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsadn authored Jul 28, 2024
1 parent a0128fe commit 9bc7369
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions oak.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
service_name: nsqauthj
deploy_type: remote_jar
pom_file: pom.xml
slack_channel: eng-dbre
slack_channel: eng-dbre-alerts
build_target_path: target
startup_wait_seconds: 10
hosts:
Expand All @@ -14,14 +14,14 @@ hosts:
up:
set:
type: http
exec: "http://localhost:8080/ping/pass?api_key=hyPhinCagCuksOk7"
exec: "http://localhost:8080/healthcheck/pass?api_key=hyPhinCagCuksOk7"
check:
type: http
exec: "http://localhost:8080/ping"
exec: "http://localhost:8080/healthcheck"
down:
set:
type: http
exec: "http://localhost:8080/ping/fail?api_key=hyPhinCagCuksOk7"
exec: "http://localhost:8080/healthcheck/fail?api_key=hyPhinCagCuksOk7"
check:
type: http
exec: "http://localhost:8080/ping"
exec: "http://localhost:8080/healthcheck"
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.sproutsocial.configuration.dropwizard.DropwizardConfigCommonsFactoryFactory;
import com.sproutsocial.nsqauthj.guice.TokenValidatorModule;
import com.sproutsocial.nsqauthj.resources.AuthResource;
import com.sproutsocial.platform.dropwizard.commons.healthcheck.HealthCheckResource;
import io.dropwizard.Application;
import io.dropwizard.health.conf.HealthConfiguration;
import io.dropwizard.health.core.HealthCheckBundle;
Expand Down Expand Up @@ -35,5 +36,6 @@ protected HealthConfiguration getHealthConfiguration(NsqAuthJConfiguration nsqAu
public void run(NsqAuthJConfiguration config, Environment env) {
Injector injector = Guice.createInjector(new TokenValidatorModule(config, env.metrics()));
env.jersey().register(injector.getInstance(AuthResource.class));
env.jersey().register(new HealthCheckResource("nsqauthj"));
}
}

0 comments on commit 9bc7369

Please sign in to comment.