From 0e5f94ff63880cabfeae6a8a79ed9d1f96d7bb63 Mon Sep 17 00:00:00 2001 From: Migan178 Date: Sat, 23 Sep 2023 13:04:38 +0900 Subject: [PATCH] feat: send db ping --- src/modules/ChatBot.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/ChatBot.ts b/src/modules/ChatBot.ts index ee0382a..d345a3f 100644 --- a/src/modules/ChatBot.ts +++ b/src/modules/ChatBot.ts @@ -68,6 +68,12 @@ export default class ChatBot { } }) db.release() + + setInterval(async () => { + const db = await database.getConnection() + await db.ping() + db.release() + }, 600000) return this } }