diff options
Diffstat (limited to 'lib/gitlab/query_limiting')
-rw-r--r-- | lib/gitlab/query_limiting/active_support_subscriber.rb | 6 | ||||
-rw-r--r-- | lib/gitlab/query_limiting/middleware.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/query_limiting/active_support_subscriber.rb b/lib/gitlab/query_limiting/active_support_subscriber.rb index 138fae7b641..4bfd526914b 100644 --- a/lib/gitlab/query_limiting/active_support_subscriber.rb +++ b/lib/gitlab/query_limiting/active_support_subscriber.rb @@ -6,10 +6,10 @@ module Gitlab attach_to :active_record def sql(event) - return if !Transaction.current || event.payload.fetch(:cached, event.payload[:name] == 'CACHE') + return if !::Gitlab::QueryLimiting::Transaction.current || event.payload.fetch(:cached, event.payload[:name] == 'CACHE') - Transaction.current.increment - Transaction.current.executed_sql(event.payload[:sql]) + ::Gitlab::QueryLimiting::Transaction.current.increment + ::Gitlab::QueryLimiting::Transaction.current.executed_sql(event.payload[:sql]) end end end diff --git a/lib/gitlab/query_limiting/middleware.rb b/lib/gitlab/query_limiting/middleware.rb index 714fe42884a..76de547b14f 100644 --- a/lib/gitlab/query_limiting/middleware.rb +++ b/lib/gitlab/query_limiting/middleware.rb @@ -13,7 +13,7 @@ module Gitlab end def call(env) - transaction, retval = Transaction.run do + transaction, retval = ::Gitlab::QueryLimiting::Transaction.run do @app.call(env) end |