Skip to content

Commit 5cf6ca1

Browse files
bigintChaituVR
andauthored
fix: remove duplicate promisification of Pool and Connection in mysql helper (#551)
Co-authored-by: Chaitanya <[email protected]>
1 parent 8978df6 commit 5cf6ca1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/helpers/mysql.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import Connection from 'mysql/lib/Connection';
55
import Pool from 'mysql/lib/Pool';
66
import log from './log';
77

8+
bluebird.promisifyAll([Pool, Connection]);
9+
810
const connectionLimit = parseInt(process.env.CONNECTION_LIMIT ?? '25');
911
log.info(`[mysql] connection limit ${connectionLimit}`);
1012

@@ -19,7 +21,6 @@ hubConfig.connectTimeout = 60e3;
1921
hubConfig.acquireTimeout = 60e3;
2022
hubConfig.timeout = 60e3;
2123
hubConfig.charset = 'utf8mb4';
22-
bluebird.promisifyAll([Pool, Connection]);
2324
const hubDB = mysql.createPool(hubConfig);
2425

2526
// @ts-ignore
@@ -33,7 +34,6 @@ sequencerConfig.connectTimeout = 60e3;
3334
sequencerConfig.acquireTimeout = 60e3;
3435
sequencerConfig.timeout = 60e3;
3536
sequencerConfig.charset = 'utf8mb4';
36-
bluebird.promisifyAll([Pool, Connection]);
3737
const sequencerDB = mysql.createPool(sequencerConfig);
3838

3939
export { hubDB as default, sequencerDB };

0 commit comments

Comments
 (0)