Skip to content

Commit

Permalink
feat: health-check should return starting if external authentication …
Browse files Browse the repository at this point in the history
…and dynamic scope is not started #1895

Signed-off-by: Yuriy Movchan <[email protected]>
  • Loading branch information
yurem committed Mar 14, 2024
1 parent 91dbf41 commit 99acc8a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ public class HealthCheckController {
public String healthCheckController() {
boolean isConnected = persistenceEntryManager.getOperationService().isConnected();
String dbStatus = isConnected ? "online" : "offline";
return "{\"status\": \"running\", \"db_status\":\"" + dbStatus + "\"}";
String appStatus = getAppStatus();
return "{\"status\": \"" + appStatus + "\", \"db_status\":\"" + dbStatus + "\"}";
}

public String getAppStatus() {
if (externalAuthenticationService.isLoaded() && externalDynamicScopeService.isLoaded()) {
return "running";
return "running";
} else {
retunr "starting";
return "starting";
}
}
}

0 comments on commit 99acc8a

Please sign in to comment.