mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
hotfix(better)
This commit is contained in:
1 parent
3ea34c7f19
commit
0f3bc0f54d
10 files changed
+156
-6
No files matched your search
+3
-1
@@ -8,6 +8,7 @@
|
||||
import fs from "node:fs";
|
||||
import mysql from "mysql2";
|
||||
import { EventEmitter } from "node:events";
|
||||
import { MYSQL_POOL_DEFAULTS, attachMysqlPoolGuard } from "./MysqlGuard.mjs";
|
||||
import { logger } from "../core/Logger.mjs";
|
||||
|
||||
/**
|
||||
@@ -183,7 +184,8 @@ export class RemoteSettingsManager extends SettingsManager {
|
||||
constructor(config, defaultsPath, botId = null) {
|
||||
super();
|
||||
this.botId = botId;
|
||||
this.db = mysql.createPool({ connectionLimit: 15, ...config });
|
||||
this.db = mysql.createPool({ ...MYSQL_POOL_DEFAULTS, connectionLimit: 15, ...config });
|
||||
attachMysqlPoolGuard(this.db, "DB");
|
||||
this.db.on('error', (err) => {
|
||||
logger.error('[DB] MySQL pool error:', err.code ?? err.message);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user