redis = YAML::load(File.open("#{ Rails.root }/config/redis.yml"))[::Rails.env]

Sidekiq.configure_server do |config|
  config.redis = { url: "#{ redis['url'] }/#{ redis['db'] }" }
end

Sidekiq.configure_client do |config|
  # config.redis = { url: "redis://#{ redis['host'] }:#{ redis['port'] }/0" }
  config.redis = { url: "#{ redis['url'] }/#{ redis['db'] }" }
end