should be able to use maxConnectRetries

- be able to specify max_connect_retries in the dsn string as part of the query string
This commit is contained in:
Rolf Vreijdenberger 2016-01-26 14:54:02 +01:00
parent df69e8980c
commit 0d5cff54ad

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