From 0d5cff54ad7b48ed953ffb173c50bf92f1c07ff1 Mon Sep 17 00:00:00 2001 From: Rolf Vreijdenberger Date: Tue, 26 Jan 2016 14:54:02 +0100 Subject: [PATCH] should be able to use maxConnectRetries - be able to specify max_connect_retries in the dsn string as part of the query string --- lib/Resque/Redis.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Resque/Redis.php b/lib/Resque/Redis.php index 5410499..e588ded 100644 --- a/lib/Resque/Redis.php +++ b/lib/Resque/Redis.php @@ -122,8 +122,10 @@ class Resque_Redis // Look for known Credis_Client options $timeout = isset($options['timeout']) ? intval($options['timeout']) : null; $persistent = isset($options['persistent']) ? $options['persistent'] : ''; + $maxRetries = isset($options['max_connect_retries']) ? $options['max_connect_retries'] : 0; $this->driver = new Credis_Client($host, $port, $timeout, $persistent); + $this->driver->setMaxConnectRetries($maxRetries); if ($password){ $this->driver->auth($password); }