Merge pull request #285 from donkeyworks/master

should be able to use maxConnectRetries
This commit is contained in:
Chris Boulton 2016-07-14 17:28:49 +10:00 committed by GitHub
commit fe04cca530

View File

@ -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);
}