Skip to content

Commit

Permalink
fix: correctly set HealthStatus of BaseRuntime
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Jun 3, 2024
1 parent 329a24f commit 31eb74a
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,9 @@ private void boot(boolean addShutdownHook) {
}

if (context.hasService(HealthCheckService.class)) {
var statusbuilder = HealthCheckResult.Builder.newInstance().component("BaseRuntime");
var startupStatus = new AtomicReference<>(statusbuilder.failure("Startup not complete").build());
var startupStatusRef = new AtomicReference<>(HealthCheckResult.Builder.newInstance().component("BaseRuntime").success().build());
var healthCheckService = context.getService(HealthCheckService.class);
healthCheckService.addStartupStatusProvider(startupStatus::get);

startupStatus.set(statusbuilder.success().build());
healthCheckService.addStartupStatusProvider(startupStatusRef::get);
}

} catch (Exception e) {
Expand Down

0 comments on commit 31eb74a

Please sign in to comment.