summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJarka Kadlecová <jarka@gitlab.com>2018-05-31 14:33:10 +0200
committerJarka Kadlecová <jarka@gitlab.com>2018-05-31 15:02:45 +0200
commitc37a9ef3c5cb5233c4a296fad2260c57c84f12ed (patch)
treee82b9073cf83f9658fa6f688ca6131b0e44d5a5d /lib
parentb8198897b971b62e0020a1ea87f781991283cfcc (diff)
downloadgitlab-ce-c37a9ef3c5cb5233c4a296fad2260c57c84f12ed.tar.gz
Make ActiveRecordSubscriber rails 5 compatible
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/query_limiting/active_support_subscriber.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/query_limiting/active_support_subscriber.rb b/lib/gitlab/query_limiting/active_support_subscriber.rb
index 4c83581c4b1..3c4ff5d1928 100644
--- a/lib/gitlab/query_limiting/active_support_subscriber.rb
+++ b/lib/gitlab/query_limiting/active_support_subscriber.rb
@@ -4,7 +4,7 @@ module Gitlab
attach_to :active_record
def sql(event)
- unless event.payload[:name] == 'CACHE'
+ unless event.payload.fetch(:cached, event.payload[:name] == 'CACHE')
Transaction.current&.increment
end
end