MCPcopy
hub / github.com/brianc/node-postgres / end

Method end

packages/pg-pool/index.js:488–499  ·  view source on GitHub ↗
(cb)

Source from the content-addressed store, hash-verified

486 }
487
488 end(cb) {
489 this.log('ending')
490 if (this.ending) {
491 const err = new Error('Called end on pool more than once')
492 return cb ? cb(err) : this.Promise.reject(err)
493 }
494 this.ending = true
495 const promised = promisify(this.Promise, cb)
496 this._endCallback = promised.callback
497 this._pulseQueue()
498 return promised.result
499 }
500
501 get waitingCount() {
502 return this._pendingQueue.length

Callers 15

testForTypeCoercionFunction · 0.95
testPoolSizeFunction · 0.95
testErrorBufferFunction · 0.95
_removeMethod · 0.45
lifecycle-hooks.jsFile · 0.45
index.jsFile · 0.45
logging.jsFile · 0.45
error-handling.jsFile · 0.45
sizing.jsFile · 0.45
ending.jsFile · 0.45

Calls 3

_pulseQueueMethod · 0.95
cbFunction · 0.85
promisifyFunction · 0.85

Tested by 1

parseBuffersFunction · 0.36