up
This commit is contained in:
@@ -42,13 +42,13 @@ public class HealthCheckService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Database check
|
// Database check
|
||||||
healthCheckHandler.register("DataBase", future -> {
|
healthCheckHandler.register("database", future -> {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
dbService.getPool().query("SELECT 1").execute()
|
dbService.getPool().query("SELECT 1").execute()
|
||||||
.onSuccess(rs -> {
|
.onSuccess(rs -> {
|
||||||
long time = System.currentTimeMillis() - start;
|
long time = System.currentTimeMillis() - start;
|
||||||
JsonObject data = new JsonObject()
|
JsonObject data = new JsonObject()
|
||||||
.put("name", "database")
|
.put("name", "DataBase")
|
||||||
.put("latency_ms", time);
|
.put("latency_ms", time);
|
||||||
future.complete(Status.OK(data));
|
future.complete(Status.OK(data));
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user