From 8ac2edf817ab77a00f0d2a1a53bb46eb2a466067 Mon Sep 17 00:00:00 2001 From: Martin Helmich Date: Mon, 18 Jan 2016 11:59:30 +0100 Subject: [PATCH] mysql: IPoolClusterConfig.restoreNodeTimeout is missing --- mysql/mysql-tests.ts | 7 +++++++ mysql/mysql.d.ts | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/mysql/mysql-tests.ts b/mysql/mysql-tests.ts index 97df14dbf..080bece2d 100644 --- a/mysql/mysql-tests.ts +++ b/mysql/mysql-tests.ts @@ -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(); diff --git a/mysql/mysql.d.ts b/mysql/mysql.d.ts index 715c799a2..9239c1907 100644 --- a/mysql/mysql.d.ts +++ b/mysql/mysql.d.ts @@ -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)