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

active_support_subscriber.rb « query_limiting « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 66049c94ec60ae3e7ee79e6676dad16c71053cc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
module Gitlab
  module QueryLimiting
    class ActiveSupportSubscriber < ActiveSupport::Subscriber
      attach_to :active_record

      def sql(*)
        Transaction.current&.increment
      end
    end
  end
end