diff options
Diffstat (limited to 'config/initializers/7_redis.rb')
-rw-r--r-- | config/initializers/7_redis.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/config/initializers/7_redis.rb b/config/initializers/7_redis.rb index 415574e1ce1..1e2786db413 100644 --- a/config/initializers/7_redis.rb +++ b/config/initializers/7_redis.rb @@ -1,5 +1,9 @@ # frozen_string_literal: true +require 'gitlab/redis' + +Redis.raise_deprecations = true unless Rails.env.production? + # We set the instance variable directly to suppress warnings. # We cannot switch to the new behavior until we change all existing `redis.exists` calls to `redis.exists?`. # Some gems also need to be updated @@ -13,11 +17,6 @@ Redis::Client.prepend(Gitlab::Instrumentation::RedisInterceptor) # 1. Sidekiq # 2. Rails.cache # 3. HTTP clients -Gitlab::Redis::Cache.with { nil } -Gitlab::Redis::Queues.with { nil } -Gitlab::Redis::SharedState.with { nil } -Gitlab::Redis::TraceChunks.with { nil } -Gitlab::Redis::RateLimiting.with { nil } -Gitlab::Redis::Sessions.with { nil } -Gitlab::Redis::DuplicateJobs.with { nil } -Gitlab::Redis::SidekiqStatus.with { nil } +Gitlab::Redis::ALL_CLASSES.each do |redis_instance| + redis_instance.with { nil } +end |