We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5395906 commit bc6b0b6Copy full SHA for bc6b0b6
1 file changed
source/database/pool/devs.js
@@ -1,8 +1,12 @@
1
const Pool = require('pg').Pool
2
3
-module.exports = global.pool = new Pool({
+global.pool = new Pool({
4
connectionString: process.env.DEVS_PG,
5
connectionTimeoutMillis: 5000,
6
idleTimeoutMillis: 10000,
7
max: 10
8
})
9
+
10
+global.pool.on('drain', global.pool.end.bind(client));
11
12
+module.exports = global.pool
0 commit comments