if Rails.env.development? || Rails.env.test?
  Sidekiq.configure_server do |config|
    config.redis = {
      url: Rails.application.credentials[:redis_url],
      namespace: "WARTERAUM_DEVELOPMENT"
    }
  end

  Sidekiq.configure_client do |config|
    config.redis = {
      url: Rails.application.credentials[:redis_url],
      namespace: "WARTERAUM_DEVELOPMENT"
    }
  end
else
  Sidekiq.configure_server do |config|
    config.redis = { url: Rails.application.credentials[:redis_url] }
  end

  Sidekiq.configure_client do |config|
    config.redis = { url: Rails.application.credentials[:redis_url] }
  end
end
