Quantcast
Channel: Active questions tagged redis+ruby-on-rails - Stack Overflow
Viewing all articles
Browse latest Browse all 873

How to switch Redis database with Sidekiq on Rails 5.2.4?

$
0
0

My application uses Sidekiq and it's web monitoring interface.Sidekiq relies on one Redis instance, declared in the Sidekiq initializer:

sidekiq.rb in Development

 Sidekiq.configure_server do |config|  config.redis = { url: 'redis://x821000109918b.adr.ch/:6379/0' } endSidekiq.configure_client do |config|  config.redis = { url: 'redis://x821000109918b.adr.ch/:6379/0' }end

Scheduling and monitoring jobs just works fine when in Development. Now I want to run the application in the Validation environment for a demonstration to business users. So when deploying to Validation, I try to connect to another Redis database on the same instance:

sidekiq.rb in Validation

 Sidekiq.configure_server do |config|  config.redis = { url: 'redis://x821000109918b.adr.ch/:6379/1' } endSidekiq.configure_client do |config|  config.redis = { url: 'redis://x821000109918b.adr.ch/:6379/1' }end

After deploying and restarting the Validation server, I see that Sidekiq shows events of the Development environment. Changing the database parameter had no effect. Is there another place to define which Redis database to use?

Thanks for your help!


Viewing all articles
Browse latest Browse all 873

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>