Adding returnToHead in clientConfig param (#1007)

remotes/origin/cdb-6.1
twisha16 8 years ago committed by Brian C
parent 667953fd5c
commit 90600f2b47

@ -33,6 +33,9 @@ var defaults = module.exports = {
//frequency to check for idle clients within the client pool
reapIntervalMillis: 1000,
//if true the most recently released resources will be the first to be allocated
returnToHead: false,
//pool log function / boolean
poolLog: false,

@ -22,6 +22,7 @@ module.exports = function(Client) {
max: clientConfig.poolSize || defaults.poolSize,
idleTimeoutMillis: clientConfig.poolIdleTimeout || defaults.poolIdleTimeout,
reapIntervalMillis: clientConfig.reapIntervalMillis || defaults.reapIntervalMillis,
returnToHead: clientConfig.returnToHead || defaults.returnToHead,
log: clientConfig.poolLog || defaults.poolLog,
create: function(cb) {
var client = new pools.Client(clientConfig);

Loading…
Cancel
Save