mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 18:01:38 +00:00
Add a healthCheck method to the Bridge, check db
This commit is contained in:
parent
1befc3582b
commit
86769eedea
1 changed files with 11 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue