我希望Celery能够在Redis上构建而不是默认的RabbitMQ.
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.
自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
原文地址:https://www.jb51.cc/ubuntu/347474.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。