Пример #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;
 }
Пример #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, $namespace = 'resque')
 {
     self::$redisServer = $server;
     self::$redisDatabase = $database;
     self::$redis = null;
     self::$namespace = $namespace;
 }
 /**
  * Given a host/port combination separated by a colon, set it as
  * the redis server that Resque will talk to.
  *
  * 设置Redis的相关配置,$server:'127.0.0.1:6379'
  * @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)
 {
     self::$redisServer = $server;
     self::$redisDatabase = $database;
     self::$redis = null;
 }