Merge pull request #591 from seegno/allow-config-override

Add support for overriding generic pool defaults
This commit is contained in:
Brian C 2014-05-22 12:09:46 -04:00
commit e81245fce4

View File

@ -17,10 +17,10 @@ var pools = {
} }
pool = genericPool.Pool({ pool = genericPool.Pool({
name: name, name: name,
max: defaults.poolSize, max: clientConfig.poolSize || defaults.poolSize,
idleTimeoutMillis: defaults.poolIdleTimeout, idleTimeoutMillis: clientConfig.poolIdleTimeout || defaults.poolIdleTimeout,
reapIntervalMillis: defaults.reapIntervalMillis, reapIntervalMillis: clientConfig.reapIntervalMillis || defaults.reapIntervalMillis,
log: defaults.poolLog, log: clientConfig.poolLog || defaults.poolLog,
create: function(cb) { create: function(cb) {
var client = new pools.Client(clientConfig); var client = new pools.Client(clientConfig);
client.connect(function(err) { client.connect(function(err) {