简体   繁体   English

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

[英]Sidekiq with workers connecting to different Redis instances

In my current project, there is a Redis Instance on Heroku and Sidekiq is configured to process jobs from that instance.在我当前的项目中,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. 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.

I am new to Rails and Sidekiq.我是 Rails 和 Sidekiq 的新手。 Please suggest a way for achieving the desired config请提出一种实现所需配置的方法

The docs say that you can run this command to get the credentials: 文档说您可以运行此命令来获取凭据:

heroku redis:credentials 

Then get the connection string with:然后获取连接字符串:

heroku config:get REDIS_URL -a example-app

Then you can use the connection string from REDIS_URL to connect externally for a bit.然后您可以使用REDIS_URL中的连接字符串在外部连接一段时间。

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

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