This commit is contained in:
Benjamin Toby
2025-07-09 21:50:07 +01:00
parent e8787a2ef8
commit da87fe6491
3 changed files with 7 additions and 4 deletions
+4 -2
View File
@@ -22,6 +22,8 @@ type Param = {
export default async function grabDSQLConnection(
param?: Param
): Promise<Connection> {
const CONN_TIMEOUT = 10000;
const config: ConnectionConfig = {
host: process.env.DSQL_DB_HOST,
user: process.env.DSQL_DB_USERNAME,
@@ -39,8 +41,8 @@ export default async function grabDSQLConnection(
bigNumberStrings: false,
dateStrings: true,
metaAsArray: true,
socketTimeout: 5000,
connectTimeout: 5000,
socketTimeout: CONN_TIMEOUT,
connectTimeout: CONN_TIMEOUT,
compress: true,
...param?.config,
};