debian-mirror-gitlab/config/initializers/7_redis.rb

24 lines
874 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
2021-11-18 22:05:49 +05:30
# 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-09-30 23:02:18 +05:30
Redis::Client.prepend(Gitlab::Instrumentation::RedisInterceptor)
2017-09-10 17:25:29 +05:30
# 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-09-04 01:27:46 +05:30
Gitlab::Redis::TraceChunks.with { nil }
2021-11-18 22:05:49 +05:30
Gitlab::Redis::RateLimiting.with { nil }
Gitlab::Redis::Sessions.with { nil }
2022-07-23 23:45:48 +05:30
Gitlab::Redis::DuplicateJobs.with { nil }
Gitlab::Redis::SidekiqStatus.with { nil }