Skip to content

Commit

Permalink
adding documentation to dbChecker
Browse files Browse the repository at this point in the history
  • Loading branch information
Fahad authored and Fahad committed Jun 21, 2024
1 parent c591737 commit a749687
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dbChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean> {
return new Promise((resolve, reject) => {
let dbAval: boolean = false;
Expand Down

0 comments on commit a749687

Please sign in to comment.