Commit 75979421 authored by Andreas Brandl's avatar Andreas Brandl

Use transaction on model instead of connection

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/336900
parent 78c75e04
...@@ -11,7 +11,7 @@ module Gitlab ...@@ -11,7 +11,7 @@ module Gitlab
retry_attempts = 0 retry_attempts = 0
begin begin
ActiveRecord::Base.transaction do # rubocop: disable Database/MultipleDatabases subject.transaction do
yield(subject) yield(subject)
end end
rescue ActiveRecord::StaleObjectError rescue ActiveRecord::StaleObjectError
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment