mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-24 17:51:51 +02:00
Add a healthCheck method to the Bridge, check db
This commit is contained in:
@@ -263,6 +263,17 @@ public class Bridge {
|
||||
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
|
||||
* the schema.
|
||||
|
||||
Reference in New Issue
Block a user