haraka-plugin-redis
Advanced tools
Comparing version 1.0.3 to 1.0.4
# 1.0.4 - 2017-02-06 | ||
- remove retry_strategy, redis client now does The Right Thing w/o it | ||
# 1.0.3 - 2017-02-06 | ||
- don't break when no [redis] config exists | ||
19
index.js
@@ -149,21 +149,2 @@ 'use strict'; | ||
if (!opts.retry_strategy) { | ||
opts.retry_strategy = function (options) { | ||
if (options.error.code === 'ECONNREFUSED') { | ||
// End reconnecting on a specific error and flush all commands with a individual error | ||
return new Error('The server refused the connection'); | ||
} | ||
if (options.total_retry_time > 1000 * 60 * 60) { | ||
// End reconnecting after a specific timeout and flush all commands with a individual error | ||
return new Error('Retry time exhausted'); | ||
} | ||
if (options.times_connected > 10) { | ||
// End reconnecting with built in error | ||
return undefined; | ||
} | ||
// reconnect after | ||
return Math.min(options.attempt * 100, 3000); | ||
}; | ||
} | ||
var client = redis.createClient(opts) | ||
@@ -170,0 +151,0 @@ .on('error', function (error) { |
{ | ||
"name": "haraka-plugin-redis", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Redis plugin for Haraka & other plugins to inherit from", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16067
255