Commit 687c56c6 authored by Andreas Brandl's avatar Andreas Brandl

Disable statement_timeout while seeding

parent 06b52982
......@@ -87,7 +87,9 @@ module Gitlab
SeedFu.quiet = true
without_statement_timeout do
yield
end
SeedFu.quiet = false
ActiveRecord::Base.logger = old_logger
......@@ -114,6 +116,13 @@ module Gitlab
def self.mute_mailer
ActionMailer::MessageDelivery.prepend(DeliverNever)
end
def self.without_statement_timeout
ActiveRecord::Base.connection.execute('SET statement_timeout=0')
yield
ensure
ActiveRecord::Base.connection.execute('RESET statement_timeout')
end
end
end
# :nocov:
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