Welcome to mirror list, hosted at ThFree Co, Russian Federation.

workhorse.rb « redis « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ea0fca515fe77dfb26c01b2311c0a7bb3efdc474 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

module Gitlab
  module Redis
    class Workhorse < ::Gitlab::Redis::Wrapper
      class << self
        def config_fallback
          SharedState
        end

        private

        def redis
          primary_store = ::Redis.new(params)
          secondary_store = ::Redis.new(config_fallback.params)

          MultiStore.new(primary_store, secondary_store, store_name)
        end
      end
    end
  end
end