Merge branch 'rails5-active-sup-subscriber' into 'master'
Make ActiveRecordSubscriber rails 5 compatible Closes #44702 See merge request gitlab-org/gitlab-ce!19276
This commit is contained in:
commit
02f8f900da
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Make ActiveRecordSubscriber rails 5 compatible
|
||||
merge_request:
|
||||
author:
|
||||
type: other
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue