updated state
This commit is contained in:
parent
4152d6f17f
commit
773b6d5720
|
@ -18,7 +18,7 @@ public class GeoportalHealthCheck implements HealthCheck {
|
||||||
@Override
|
@Override
|
||||||
public HealthCheckResponse call() {
|
public HealthCheckResponse call() {
|
||||||
log.info(GeoportalHealthCheck.class.getSimpleName() + " 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class MongoHealthCheck implements HealthCheck {
|
||||||
ScopeProvider.instance.set(context);
|
ScopeProvider.instance.set(context);
|
||||||
mongo = ImplementationProvider.get().getProvidedObjectByClass(Mongo.class);
|
mongo = ImplementationProvider.get().getProvidedObjectByClass(Mongo.class);
|
||||||
buildHCRBuilder = appendMongoInfo(buildHCRBuilder, mongo.getConnection());
|
buildHCRBuilder = appendMongoInfo(buildHCRBuilder, mongo.getConnection());
|
||||||
buildHCRBuilder.status(true);
|
buildHCRBuilder.state(true);
|
||||||
MongoIterable<String> collections = mongo.getTheClient().getDatabase(mongo.getConnection().getDatabase())
|
MongoIterable<String> collections = mongo.getTheClient().getDatabase(mongo.getConnection().getDatabase())
|
||||||
.listCollectionNames();
|
.listCollectionNames();
|
||||||
log.info("listCollectionNames is null: {}", collections == null);
|
log.info("listCollectionNames is null: {}", collections == null);
|
||||||
|
@ -50,7 +50,7 @@ public class MongoHealthCheck implements HealthCheck {
|
||||||
}
|
}
|
||||||
return buildHCRBuilder.build();
|
return buildHCRBuilder.build();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
buildHCRBuilder.status(false);
|
buildHCRBuilder.state(false);
|
||||||
if (mongo != null) {
|
if (mongo != null) {
|
||||||
MongoConnection connection = null;
|
MongoConnection connection = null;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue