Closed beheh closed 8 years ago
Also, note that PHPs parse_url cannot handle unix:///
uris (as Credis proposes), since PHPs doc on this function states:
This function is intended specifically for the purpose of parsing URLs and not URIs. However, to comply with PHP's backwards compatibility requirements it makes an exception for the file:// scheme where triple slashes (file:///...) are allowed. For any other scheme this is invalid.
@beheh: It actually works if you just pass absolute path of unix socket as hostname (without scheme etc). And yes, unix://
prefix isn't supported right now at all. And as you said just adding unix
to allowed schemes in Resque_Redis::parseDns()
doesn't cut it because of the shortcomings of parse_url()
function. Somebody should do something :).
Addressed by #298
The version 1.2 accepted a
unix://<path>
style socket path to connect to redis. credis does still support this, but the Resque_Redis-Wrapper does not allow the "unix" protocol inparseDsn
.This should be allowed, although unix sockets do not understand the notion of ports. A workaround is to use
Resque::setBackend(array(array('host' => 'unix://<path>')))
, but this is not easily possible on the command line to use the supplied bin/resque worker (this works because an array is directly passed to Credis_Cluster, which then initializes Credis_Client(s)).I also barely found any documentation of this feature. It would be nice if this is mentioned at least somewhere.