updated state

This commit is contained in:
Francesco Mangiacrapa 2024-10-18 10:53:58 +02:00
parent 4152d6f17f
commit 773b6d5720
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ public class GeoportalHealthCheck implements HealthCheck {
@Override
public HealthCheckResponse call() {
log.info(GeoportalHealthCheck.class.getSimpleName() + " call");
return HealthCheckResponse.named(SERVICE_NAME).status(true).withData("status", "healthy").build();
return HealthCheckResponse.named(SERVICE_NAME).state(true).withData("status", "healthy").build();
}
}

View File

@ -38,7 +38,7 @@ public class MongoHealthCheck implements HealthCheck {
ScopeProvider.instance.set(context);
mongo = ImplementationProvider.get().getProvidedObjectByClass(Mongo.class);
buildHCRBuilder = appendMongoInfo(buildHCRBuilder, mongo.getConnection());
buildHCRBuilder.status(true);
buildHCRBuilder.state(true);
MongoIterable<String> collections = mongo.getTheClient().getDatabase(mongo.getConnection().getDatabase())
.listCollectionNames();
log.info("listCollectionNames is null: {}", collections == null);
@ -50,7 +50,7 @@ public class MongoHealthCheck implements HealthCheck {
}
return buildHCRBuilder.build();
} catch (Exception e) {
buildHCRBuilder.status(false);
buildHCRBuilder.state(false);
if (mongo != null) {
MongoConnection connection = null;
try {