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

17 lines
411 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
2022-10-11 01:57:18 +05:30
require 'gitlab/redis'
Redis.raise_deprecations = true unless Rails.env.production?
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
2022-10-11 01:57:18 +05:30
Gitlab::Redis::ALL_CLASSES.each do |redis_instance|
redis_instance.with { nil }
end