f0391c2517
Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
11 lines
231 B
Ruby
11 lines
231 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DatabaseConnectionHelpers
|
|
def run_with_new_database_connection
|
|
pool = ActiveRecord::Base.connection_pool
|
|
conn = pool.checkout
|
|
yield conn
|
|
ensure
|
|
pool.checkin(conn)
|
|
end
|
|
end
|