Example #1
0
 /**
  * Given a host/port combination separated by a colon, set it as
  * the redis server that Resque will talk to.
  *
  * @param mixed $server Host/port combination separated by a colon, or
  *                      a nested array of servers with host/port pairs.
  * @param int $database
  */
 public static function setBackend($server, $database = 0, $password = '')
 {
     self::$redisServer = $server;
     self::$redisDatabase = $database;
     self::$redisPassword = $password;
     self::$redis = null;
 }
Example #2
0
 /**
  * Given a host/port combination separated by a colon, set it as
  * the redis server that Resque will talk to.
  *
  * @param mixed $server Host/port combination separated by a colon, or
  *                      a nested array of servers with host/port pairs.
  * @param int $database
  */
 public static function setBackend($server, $database = 0, $password = '', $timeout = 5)
 {
     self::$redisServer = $server;
     self::$redisDatabase = $database;
     self::$redisPassword = $password;
     self::$redisConnectTimeout = $timeout;
     self::$redis = null;
 }