From a749687f36b0fefc9d51b95a096bb10708d5ae28 Mon Sep 17 00:00:00 2001 From: Fahad Date: Fri, 21 Jun 2024 14:52:06 -0400 Subject: [PATCH] adding documentation to dbChecker --- dbChecker.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;