I am trying to figure out how can you write specific Sidekiq configuration depending on the environment. I know that you can write in config/sidekiq.yml something like:
:concurrency: 5
:verbose: false
:pidfile: ./tmp/pids/sidekiq.pid
:logfile: ./log/sidekiq.log
:queues:
- [carrierwave, 7]
- [client_emails, 5]
- [default, 3]
staging:
:concurrency: 10
production:
:concurrency: 25
However, right now and based on: por.rb, I would have the Redis configuration in that file. But the Redis address changes whether the Sidekiq is running in localhost or in Amazon. So my question is, in pure Ruby, how do you write specific configuration-environment files? I know in Rails you would write specific ones under config/initializers/environment/sidekiq.rb
, but what about in pure Ruby?