Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
687c56c6
Commit
687c56c6
authored
Oct 02, 2020
by
Andreas Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable statement_timeout while seeding
parent
06b52982
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
lib/gitlab/seeder.rb
lib/gitlab/seeder.rb
+10
-1
No files found.
lib/gitlab/seeder.rb
View file @
687c56c6
...
@@ -87,7 +87,9 @@ module Gitlab
...
@@ -87,7 +87,9 @@ module Gitlab
SeedFu
.
quiet
=
true
SeedFu
.
quiet
=
true
yield
without_statement_timeout
do
yield
end
SeedFu
.
quiet
=
false
SeedFu
.
quiet
=
false
ActiveRecord
::
Base
.
logger
=
old_logger
ActiveRecord
::
Base
.
logger
=
old_logger
...
@@ -114,6 +116,13 @@ module Gitlab
...
@@ -114,6 +116,13 @@ module Gitlab
def
self
.
mute_mailer
def
self
.
mute_mailer
ActionMailer
::
MessageDelivery
.
prepend
(
DeliverNever
)
ActionMailer
::
MessageDelivery
.
prepend
(
DeliverNever
)
end
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
end
end
# :nocov:
# :nocov:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment