Exemple #1
0
 public function setRedisConfiguration($host, $port, $database, $password = null)
 {
     $this->redisConfiguration = array('host' => $host, 'port' => $port, 'database' => $database, 'password' => $password);
     $host = substr($host, 0, 1) == '/' ? $host : $host . ':' . $port;
     if (!isset($password)) {
         \Resque::setBackend($host . ':' . $port, $database);
     } else {
         $server = 'redis://:' . $password . '@' . $host . ':' . $port;
         \Resque::setBackend($server, $database);
         \Resque::redis()->auth($password);
     }
 }
 public function setRedisConfiguration($host, $port, $database)
 {
     $this->redisConfiguration = array('host' => $host, 'port' => $port, 'database' => $database);
     \Resque::setBackend($host . ':' . $port, $database);
 }