refactor(prod sql): removed closeing the pool that was weird

This commit is contained in:
2026-01-13 17:57:30 -06:00
parent e7a0a3ff21
commit 9ca24a266a

View File

@@ -1,6 +1,5 @@
import { returnFunc } from "../utils/returnHelper.utils.js"; import { returnFunc } from "../utils/returnHelper.utils.js";
import { import {
closePool,
connected, connected,
pool, pool,
reconnecting, reconnecting,
@@ -64,7 +63,6 @@ export const prodQuery = async (queryToRun: string, name: string) => {
} catch (error: unknown) { } catch (error: unknown) {
const err = error as SqlError; const err = error as SqlError;
if (err.code === "ETIMEOUT") { if (err.code === "ETIMEOUT") {
closePool();
return returnFunc({ return returnFunc({
success: false, success: false,
module: "system", module: "system",
@@ -77,7 +75,6 @@ export const prodQuery = async (queryToRun: string, name: string) => {
} }
if (err.code === "EREQUEST") { if (err.code === "EREQUEST") {
closePool();
return returnFunc({ return returnFunc({
success: false, success: false,
module: "system", module: "system",