mirror of
https://github.com/idanoo/php-resque
synced 2025-06-30 21:22:20 +00:00
Enabling use of unix sockets on Redis backend.
This commit is contained in:
parent
4700375d25
commit
0ac835a630
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue