Skip to content

Commit

Permalink
fix: correctly reset HealthStatus of BaseRuntime (#4229)
Browse files Browse the repository at this point in the history
fix: correctly set HealthStatus of BaseRuntime
  • Loading branch information
paullatzelsperger committed Jun 3, 2024
1 parent 256734b commit 968f138
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 968f138

Please sign in to comment.