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
@@ -1,6 +1,7 @@
|
||||
/** @module src/services/TrackOptionsManager @description Per-user track options (start/end timestamps) stored in MySQL. Provides caching, matching, and CRUD for track segments. */
|
||||
import mysql from "mysql2";
|
||||
import { logger } from "../core/Logger.mjs";
|
||||
import { MYSQL_POOL_DEFAULTS, attachMysqlPoolGuard } from "../db/MysqlGuard.mjs";
|
||||
|
||||
const DEFAULT_ALIAS = "default";
|
||||
const MAX_ALIAS_LEN = 32;
|
||||
@@ -24,7 +25,8 @@ export class TrackOptionsManager {
|
||||
|
||||
/** @param {object} mysqlConfig - MySQL connection config. */
|
||||
constructor(mysqlConfig) {
|
||||
this.db = mysql.createPool({ connectionLimit: 10, ...mysqlConfig });
|
||||
this.db = mysql.createPool({ ...MYSQL_POOL_DEFAULTS, connectionLimit: 10, ...mysqlConfig });
|
||||
attachMysqlPoolGuard(this.db, "TrackOptions");
|
||||
this.db.on("error", (err) => {
|
||||
logger.error("[TrackOptions] MySQL pool error:", err.code ?? err.message);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user