Add a healthCheck method to the Bridge, check db

This commit is contained in:
Shane Kilkelly 2020-06-18 11:45:04 +01:00
parent 1befc3582b
commit 86769eedea

View file

@ -263,6 +263,17 @@ public class Bridge {
gcJob.start(); gcJob.start();
} }
public boolean healthCheck() {
try {
dbStore.getNumProjects();
Log.error("[HealthCheck] passed");
return true;
} catch (Exception e) {
Log.error("[HealthCheck] FAILED!", e);
return false;
}
}
/** /**
* Performs a check of inconsistencies in the DB. This was used to upgrade * Performs a check of inconsistencies in the DB. This was used to upgrade
* the schema. * the schema.