繁体   English   中英

Sidekiq 与连接到不同 Redis 实例的工作人员

[英]Sidekiq with workers connecting to different Redis instances

在我当前的项目中,Heroku 上有一个 Redis 实例,Sidekiq 配置为处理来自该实例的作业。 We need to migrate the Redis instance to Azure and I wanted to use a configuration where one Worker connects to the Redis Instance on Heroku to process any queued jobs and the rest of the Workers connecting to the new instance on Azure to avoid any data loss.

我是 Rails 和 Sidekiq 的新手。 请提出一种实现所需配置的方法

文档说您可以运行此命令来获取凭据:

heroku redis:credentials 

然后获取连接字符串:

heroku config:get REDIS_URL -a example-app

然后您可以使用REDIS_URL中的连接字符串在外部连接一段时间。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM