Merge tag '0.2.1' into development

0.2.1
This commit is contained in:
Holger Reinhardt 2016-08-01 10:49:33 +02:00
commit 31902c21ab

View File

@ -53,9 +53,15 @@ class ResqueServiceProvider extends ServiceProvider
$host = isset($config['host']) ? $config['host'] : 'localhost';
$port = isset($config['port']) ? $config['port'] : 6379;
$database = isset($config['database']) ? $config['database'] : 0;
$password = isset($config['password']) ? $config['password'] : '';
$server = implode(':', [$host, $port]);
if ($password) {
$server = implode('@', [$password, $server]);
}
\Resque::setBackend($server, $database);
$dsn = sprintf('redis://%s/%s', $server, $database);
\Resque::setBackend($dsn);
}
}