feat(api): Add support for multithreaded API servers

This commit is contained in:
Jesse Wierzbinski 2024-05-13 11:36:46 -10:00
parent e502a2d8c8
commit 6c3fcf699e
No known key found for this signature in database
6 changed files with 66 additions and 1 deletions

View file

@ -20,6 +20,12 @@ export const setupDatabase = async (
try {
await client.connect();
} catch (e) {
if (
(e as Error).message ===
"Client has already been connected. You cannot reuse a client."
)
return;
await logger.logError(LogLevel.CRITICAL, "Database", e as Error);
await logger.log(