Merge pull request #591 from seegno/allow-config-override
Add support for overriding generic pool defaults
This commit is contained in:
commit
e81245fce4
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user