mysql: IPoolClusterConfig.restoreNodeTimeout is missing

This commit is contained in:
Martin Helmich
2016-01-18 11:59:30 +01:00
parent 70bf7e2bfe
commit 8ac2edf817
2 changed files with 13 additions and 0 deletions
+7
View File
@@ -222,6 +222,13 @@ var pool = poolCluster.of('SLAVE*', 'RANDOM');
pool.getConnection(function (err, connection) { });
pool.getConnection(function (err, connection) { });
var poolClusterWithOptions = mysql.createPoolCluster({
canRetry: true,
removeNodeErrorCount: 3,
restoreNodeTimeout: 1000,
defaultSelector: 'RR'
});
// destroy
poolCluster.end();
+6
View File
@@ -408,6 +408,12 @@ declare module "mysql" {
*/
removeNodeErrorCount?: number;
/**
* If connection fails, specifies the number of milliseconds before another connection attempt will be made.
* If set to 0, then node will be removed instead and never re-used. (Default: 0)
*/
restoreNodeTimeout?: number;
/**
* The default selector. (Default: RR)
* RR: Select one alternately. (Round-Robin)