I would like Celery to build on Redis rather than the default RabbitMQ.
The Celery documentation explains:
Configuration is easy, just configure the location of your Redis database:
BROKER_URL = 'redis://localhost:6379/0'
Where the URL is in the format of:
redis://:password@hostname:port/db_number
all fields after the scheme are optional, and will default to localhost on port 6379, using database 0.
However, I have Redis set up NOT to listen to a port, but instead to listen to a socket.
Is there a URI scheme to support this?
Redis sockets are available since Celery 1.3. The syntax is:
BROKER_URL = 'redis+socket:///tmp/redis.sock'
If you want to use a specific database:
BROKER_URL = 'redis+socket:///tmp/redis.sock?virtual_host=1'
The documentation is not up-do-date, but you can check this issues for more details:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With