ubuntu – 配置Celery通过Unix套接字与Redis通信

我希望Celery能够在Redis上构建而不是认的RabbitMQ.

Celery documentation解释说:

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.

但是,我有Redis设置不要监听端口,而是听取套接字.

一个URI方案来支持这个吗?

自Celery 1.3起,Redis插座可供使用.语法是:
broKER_URL = 'redis+socket:///tmp/redis.sock'

如果要使用特定数据库

broKER_URL = 'redis+socket:///tmp/redis.sock?virtual_host=1'

该文档不是最新版本,但您可以查看此问题以获取更多详细信息:

> https://github.com/celery/celery/issues/1283
> https://github.com/celery/kombu/pull/238

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...