2021-02-03 16:09:17 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-10-04 08:11:58 -04:00
|
|
|
# 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
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/issues/340602
|
|
|
|
Redis.instance_variable_set(:@exists_returns_integer, false)
|
|
|
|
|
2021-06-22 23:07:43 -04:00
|
|
|
Redis::Client.prepend(Gitlab::Instrumentation::RedisInterceptor)
|
|
|
|
|
2017-07-10 23:35:47 -04:00
|
|
|
# Make sure we initialize a Redis connection pool before multi-threaded
|
|
|
|
# execution starts by
|
|
|
|
# 1. Sidekiq
|
|
|
|
# 2. Rails.cache
|
|
|
|
# 3. HTTP clients
|
|
|
|
Gitlab::Redis::Cache.with { nil }
|
|
|
|
Gitlab::Redis::Queues.with { nil }
|
|
|
|
Gitlab::Redis::SharedState.with { nil }
|
2021-06-09 02:10:29 -04:00
|
|
|
Gitlab::Redis::TraceChunks.with { nil }
|
2021-09-30 14:11:31 -04:00
|
|
|
Gitlab::Redis::RateLimiting.with { nil }
|
2021-10-15 11:10:09 -04:00
|
|
|
Gitlab::Redis::Sessions.with { nil }
|
2022-06-03 11:09:26 -04:00
|
|
|
Gitlab::Redis::DuplicateJobs.with { nil }
|
2022-06-10 08:09:36 -04:00
|
|
|
Gitlab::Redis::SidekiqStatus.with { nil }
|