Skip to content

Commit 9a61e9a

Browse files
committed
Format with prettier
1 parent edf1a86 commit 9a61e9a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/pg-pool/index.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,14 @@ class Pool extends EventEmitter {
255255
setTimeout(() => {
256256
this.log('ending client due to expired lifetime')
257257
this._expired.add(client)
258-
const idleIndex = this._idle.findIndex(idleItem => idleItem.client === client)
258+
const idleIndex = this._idle.findIndex((idleItem) => idleItem.client === client)
259259
if (idleIndex !== -1) {
260-
this._acquireClient(client, new PendingItem((err, client, clientRelease) => clientRelease()), idleListener, false)
260+
this._acquireClient(
261+
client,
262+
new PendingItem((err, client, clientRelease) => clientRelease()),
263+
idleListener,
264+
false
265+
)
261266
}
262267
}, this.options.maxLifetimeSeconds * 1000)
263268
}

packages/pg-pool/test/lifetime-timeout.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ describe('lifetime timeout', () => {
2929
done()
3030
})
3131
})
32-
it('can remove expired clients and recreate them',
32+
it(
33+
'can remove expired clients and recreate them',
3334
co.wrap(function* () {
3435
const pool = new Pool({ maxLifetimeSeconds: 1 })
3536
let query = pool.query('SELECT pg_sleep(1)')

0 commit comments

Comments
 (0)