From 773b6d572006406a8cba7ae7f336d8db42497c60 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Fri, 18 Oct 2024 10:53:58 +0200 Subject: [PATCH] updated state --- .../geoportal/service/rest/health/GeoportalHealthCheck.java | 2 +- .../geoportal/service/rest/health/MongoHealthCheck.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/GeoportalHealthCheck.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/GeoportalHealthCheck.java index 7cd1ff5..b8c38ce 100644 --- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/GeoportalHealthCheck.java +++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/GeoportalHealthCheck.java @@ -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(); } } diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/MongoHealthCheck.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/MongoHealthCheck.java index d1be35a..4e88e51 100644 --- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/MongoHealthCheck.java +++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/MongoHealthCheck.java @@ -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 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 {