From 3fae2b6bb9fb0763d5fa5774edc8fb90fef92845 Mon Sep 17 00:00:00 2001 From: joseph le Date: Mon, 4 Sep 2023 14:00:19 +0700 Subject: [PATCH] update interval watch file && update config database --- app/utils/runtimeCheckLogs.ts | 2 +- config/database.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/utils/runtimeCheckLogs.ts b/app/utils/runtimeCheckLogs.ts index 5685684..6da0924 100644 --- a/app/utils/runtimeCheckLogs.ts +++ b/app/utils/runtimeCheckLogs.ts @@ -72,7 +72,7 @@ export async function runtimeCheckLogs(folderPath) { const filePath = `${folderPath}/${fileName}`; const scan = fs.watchFile( filePath, - { interval: 120000 }, + { interval: 300000 }, async (eventType) => { //check special item, extra RAM, error in log let lines = []; diff --git a/config/database.ts b/config/database.ts index 20fae94..e0a0d1c 100644 --- a/config/database.ts +++ b/config/database.ts @@ -42,6 +42,8 @@ const databaseConfig: DatabaseConfig = { password: Env.get('MYSQL_PASSWORD', ''), database: Env.get('MYSQL_DB_NAME'), }, + pool: {min:1, max:200}, + acquireConnectionTimeout: 10000, migrations: { naturalSort: true, },