簡體   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