summaryrefslogtreecommitdiff
path: root/lib/gitlab/database/load_balancing/active_record_proxy.rb
blob: 7763497e770d32458620550620658331288e72d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Gitlab
  module Database
    module LoadBalancing
      # Module injected into ActiveRecord::Base to allow hijacking of the
      # "connection" method.
      module ActiveRecordProxy
        def connection
          LoadBalancing.proxy
        end
      end
    end
  end
end