mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 22:20:55 +03:00
Allow to set custom retry parameters
This commit is contained in:
@@ -11,12 +11,12 @@ module.exports = function(config) {
|
||||
const client = redis.createClient({
|
||||
host: config.redis_host,
|
||||
retry_strategy: options => {
|
||||
if (options.total_retry_time > 10000) {
|
||||
if (options.total_retry_time > config.redis_retry_time) {
|
||||
client.emit('error', 'Retry time exhausted');
|
||||
return new Error('Retry time exhausted');
|
||||
}
|
||||
|
||||
return 500;
|
||||
return config.redis_retry_delay;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user