refactor(prod sql): removed closeing the pool that was weird
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { returnFunc } from "../utils/returnHelper.utils.js";
|
||||
import {
|
||||
closePool,
|
||||
connected,
|
||||
pool,
|
||||
reconnecting,
|
||||
@@ -64,7 +63,6 @@ export const prodQuery = async (queryToRun: string, name: string) => {
|
||||
} catch (error: unknown) {
|
||||
const err = error as SqlError;
|
||||
if (err.code === "ETIMEOUT") {
|
||||
closePool();
|
||||
return returnFunc({
|
||||
success: false,
|
||||
module: "system",
|
||||
@@ -77,7 +75,6 @@ export const prodQuery = async (queryToRun: string, name: string) => {
|
||||
}
|
||||
|
||||
if (err.code === "EREQUEST") {
|
||||
closePool();
|
||||
return returnFunc({
|
||||
success: false,
|
||||
module: "system",
|
||||
|
||||
Reference in New Issue
Block a user