mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 08:15:14 +00:00
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:
parent
df69e8980c
commit
0d5cff54ad
@ -122,8 +122,10 @@ class Resque_Redis
|
|||||||
// Look for known Credis_Client options
|
// Look for known Credis_Client options
|
||||||
$timeout = isset($options['timeout']) ? intval($options['timeout']) : null;
|
$timeout = isset($options['timeout']) ? intval($options['timeout']) : null;
|
||||||
$persistent = isset($options['persistent']) ? $options['persistent'] : '';
|
$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 = new Credis_Client($host, $port, $timeout, $persistent);
|
||||||
|
$this->driver->setMaxConnectRetries($maxRetries);
|
||||||
if ($password){
|
if ($password){
|
||||||
$this->driver->auth($password);
|
$this->driver->auth($password);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user