From fb02ee80ef35582b11498e0f4f5fc30fcd11d7ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lenar=20L=C3=B5hmus?= Date: Mon, 12 Jan 2015 20:27:11 +0200 Subject: [PATCH] Allow path to unix socket as hostname --- Resque.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Resque.php b/Resque.php index f0e263a..a3c3aa8 100644 --- a/Resque.php +++ b/Resque.php @@ -43,8 +43,9 @@ public function setRedisConfiguration($host, $port, $database) 'port' => $port, 'database' => $database, ); + $host = substr($host, 0, 1) == '/' ? $host : $host.':'.$port; - \Resque::setBackend($host.':'.$port, $database); + \Resque::setBackend($host, $database); } public function setGlobalRetryStrategy($strategy)