debian-mirror-gitlab/lib/gitlab/database/load_balancing/active_record_proxy.rb

16 lines
335 B
Ruby
Raw Normal View History

2021-09-04 01:27:46 +05:30
# 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
2021-10-27 15:23:28 +05:30
::Gitlab::Database::LoadBalancing.proxy
2021-09-04 01:27:46 +05:30
end
end
end
end
end