mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 08:15:14 +00:00
Update changelog. Formatting fixes
This commit is contained in:
parent
be2ffa7d6c
commit
ae89f29057
@ -3,6 +3,8 @@
|
|||||||
PHP.
|
PHP.
|
||||||
* Implement ability to have setUp and tearDown methods for jobs, called before
|
* Implement ability to have setUp and tearDown methods for jobs, called before
|
||||||
and after every single run.
|
and after every single run.
|
||||||
|
* Ability to specify a cluster/multiple redis servers and consistent hash
|
||||||
|
between them (Thanks dceballos)
|
||||||
|
|
||||||
## 1.0 (2010-04-18) ##
|
## 1.0 (2010-04-18) ##
|
||||||
|
|
||||||
|
@ -22,21 +22,20 @@ class Resque
|
|||||||
* Given a host/port combination separated by a colon, set it as
|
* Given a host/port combination separated by a colon, set it as
|
||||||
* the redis server that Resque will talk to.
|
* the redis server that Resque will talk to.
|
||||||
*
|
*
|
||||||
* @param string $server Host/port combination separated by a colon.
|
* @param mixed $server Host/port combination separated by a colon, or
|
||||||
|
* a nested array of servers with host/port pairs.
|
||||||
*/
|
*/
|
||||||
public static function setBackend($server)
|
public static function setBackend($server)
|
||||||
{
|
{
|
||||||
if(is_array($server)) {
|
if(is_array($server)) {
|
||||||
|
require_once dirname(__FILE__) . '/Resque/RedisCluster.php';
|
||||||
require_once dirname(__FILE__) . '/Resque/RedisCluster.php';
|
self::$redis = new Resque_RedisCluster($server);
|
||||||
self::$redis = new Resque_RedisCluster($server);
|
}
|
||||||
|
else {
|
||||||
}else{
|
list($host, $port) = explode(':', $server);
|
||||||
list($host, $port) = explode(':', $server);
|
require_once dirname(__FILE__) . '/Resque/Redis.php';
|
||||||
|
self::$redis = new Resque_Redis($host, $port);
|
||||||
require_once dirname(__FILE__) . '/Resque/Redis.php';
|
}
|
||||||
self::$redis = new Resque_Redis($host, $port);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user