module RedisResolver
  module_function

  def get_redis_config
    redis_url = begin
      # TODO: !Important
      # need to fetch by service name if we use multiple redis services
      JSON.parse(ENV["VCAP_SERVICES"])["redis"][0]["credentials"]["uri"]
    rescue
      ENV["REDIS_URL"]
    end
    
    { url: redis_url, db: 0 }
  end
end

module RedisResolver
  module_function

  def get_redis_config
    redis_url = begin
      # TODO: !Important
      # need to fetch by service name if we use multiple redis services
      JSON.parse(ENV["VCAP_SERVICES"])["redis"][0]["credentials"]["uri"]
    rescue
      ENV["REDIS_URL"]
    end
    
    { url: redis_url, db: 0, id: nil }
  end
end

Fix issue with sidekiq web
Fix issue with sidekiq web

https://github.com/mperham/sidekiq/wiki/Using-Redis#disabled-client-command
