mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 00:11:53 +00:00
Update changelog. Formatting fixes
This commit is contained in:
parent
be2ffa7d6c
commit
ae89f29057
@ -3,6 +3,8 @@
|
||||
PHP.
|
||||
* Implement ability to have setUp and tearDown methods for jobs, called before
|
||||
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) ##
|
||||
|
||||
|
@ -22,21 +22,20 @@ class Resque
|
||||
* Given a host/port combination separated by a colon, set it as
|
||||
* 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)
|
||||
{
|
||||
if(is_array($server)) {
|
||||
|
||||
require_once dirname(__FILE__) . '/Resque/RedisCluster.php';
|
||||
self::$redis = new Resque_RedisCluster($server);
|
||||
|
||||
}else{
|
||||
list($host, $port) = explode(':', $server);
|
||||
|
||||
require_once dirname(__FILE__) . '/Resque/Redis.php';
|
||||
self::$redis = new Resque_Redis($host, $port);
|
||||
}
|
||||
if(is_array($server)) {
|
||||
require_once dirname(__FILE__) . '/Resque/RedisCluster.php';
|
||||
self::$redis = new Resque_RedisCluster($server);
|
||||
}
|
||||
else {
|
||||
list($host, $port) = explode(':', $server);
|
||||
require_once dirname(__FILE__) . '/Resque/Redis.php';
|
||||
self::$redis = new Resque_Redis($host, $port);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user