Adding returnToHead in clientConfig param (#1007)
This commit is contained in:
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…
Reference in New Issue
Block a user