diff --git a/dbChecker.ts b/dbChecker.ts index 99868d0..496084c 100644 --- a/dbChecker.ts +++ b/dbChecker.ts @@ -4,7 +4,10 @@ export function secondsToMs(d: number) { return d * 1000; } -// threading should happen at top level of server "setInterval" +/** + * @param TIMEOUT seconds till return false + * @returns true if DB avail, false otherwise + */ async function checkDB(TIMEOUT: number): Promise { return new Promise((resolve, reject) => { let dbAval: boolean = false;