Reputation: 350
I'm trying to connect a RQ worker to a Redis server on a Unix domain socket.
I've tried the following
$ rq worker --url '/path/to/redis.sock'
Error 111 connecting to None:6379. Connection refused.
$ rq worker --url 'redis:///path/to/redis.sock'
Error 111 connecting to None:6379. Connection refused.
$ rq worker --url 'redis+socket:///path/to/redis.sock'
Error 111 connecting to None:6379. Connection refused.
There is mention of a --socket
flag in a verion of the change log https://github.com/rq/rq/blob/995492878df5f6b7a32614a6050af0f3a4033e2c/CHANGES.md but that doesn't seem to work.
$ rq worker --socket --url '/path/to/redis.sock'
Error: no such option: --socket
Upvotes: 2
Views: 758
Reputation: 350
The correct URL syntax for connecting to a Redis server on a unix socket from RQ is unix:///path/to/redis.sock
$ rq worker --url unix:///path/to/redis.sock
...
Upvotes: 3