Skip to content

Commit bc6b0b6

Browse files
authored
Update devs.js
1 parent 5395906 commit bc6b0b6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

source/database/pool/devs.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
const Pool = require('pg').Pool
22

3-
module.exports = global.pool = new Pool({
3+
global.pool = new Pool({
44
connectionString: process.env.DEVS_PG,
55
connectionTimeoutMillis: 5000,
66
idleTimeoutMillis: 10000,
77
max: 10
88
})
9+
10+
global.pool.on('drain', global.pool.end.bind(client));
11+
12+
module.exports = global.pool

0 commit comments

Comments
 (0)