Enabling use of unix sockets on Redis backend.

This commit is contained in:
pedroarnal 2012-01-25 00:46:34 +01:00
parent 4700375d25
commit 0ac835a630

View File

@ -33,7 +33,13 @@ class Resque
self::$redis = new Resque_RedisCluster($server);
}
else {
list($host, $port) = explode(':', $server);
if (strpos($server, 'unix:') === false) {
list($host, $port) = explode(':', $server);
}
else {
$host = $server;
$port = null;
}
require_once dirname(__FILE__) . '/Resque/Redis.php';
self::$redis = new Resque_Redis($host, $port);
}