Skip to content

Commit 0d5cff5

Browse files
should be able to use maxConnectRetries
- be able to specify max_connect_retries in the dsn string as part of the query string
1 parent df69e89 commit 0d5cff5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Resque/Redis.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ public function __construct($server, $database = null)
122122
// Look for known Credis_Client options
123123
$timeout = isset($options['timeout']) ? intval($options['timeout']) : null;
124124
$persistent = isset($options['persistent']) ? $options['persistent'] : '';
125+
$maxRetries = isset($options['max_connect_retries']) ? $options['max_connect_retries'] : 0;
125126

126127
$this->driver = new Credis_Client($host, $port, $timeout, $persistent);
128+
$this->driver->setMaxConnectRetries($maxRetries);
127129
if ($password){
128130
$this->driver->auth($password);
129131
}

0 commit comments

Comments
 (0)