diff options
author | Jarka Kadlecová <jarka@gitlab.com> | 2018-05-31 15:33:10 +0300 |
---|---|---|
committer | Jarka Kadlecová <jarka@gitlab.com> | 2018-05-31 16:02:45 +0300 |
commit | c37a9ef3c5cb5233c4a296fad2260c57c84f12ed (patch) | |
tree | e82b9073cf83f9658fa6f688ca6131b0e44d5a5d /lib/gitlab/query_limiting | |
parent | b8198897b971b62e0020a1ea87f781991283cfcc (diff) |
Make ActiveRecordSubscriber rails 5 compatible
Diffstat (limited to 'lib/gitlab/query_limiting')
-rw-r--r-- | lib/gitlab/query_limiting/active_support_subscriber.rb | 2 |
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 |