summaryrefslogtreecommitdiff
path: root/lib/gitlab/seeder.rb
diff options
context:
space:
mode:
authorMario de la Ossa <mariodelaossa@gmail.com>2019-01-07 15:05:35 -0600
committerMario de la Ossa <mariodelaossa@gmail.com>2019-01-08 17:18:15 -0600
commite4875cd2410018f639000118df7b6c2f1d7dd057 (patch)
treea9cc2d956da9d1edf84ac5e1a06ae545475c9126 /lib/gitlab/seeder.rb
parent2ab68a2341ba0925e434dd0270ef2b0e9934be4e (diff)
downloadgitlab-ce-e4875cd2410018f639000118df7b6c2f1d7dd057.tar.gz
Backport of elastic-test-repos from EE
Diffstat (limited to 'lib/gitlab/seeder.rb')
-rw-r--r--lib/gitlab/seeder.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/gitlab/seeder.rb b/lib/gitlab/seeder.rb
index 84a51773276..8e2f16271eb 100644
--- a/lib/gitlab/seeder.rb
+++ b/lib/gitlab/seeder.rb
@@ -26,6 +26,19 @@ module Gitlab
puts "\nOK".color(:green)
end
+ def self.without_gitaly_timeout
+ # Remove Gitaly timeout
+ old_timeout = Gitlab::CurrentSettings.current_application_settings.gitaly_timeout_default
+ Gitlab::CurrentSettings.current_application_settings.update_columns(gitaly_timeout_default: 0)
+ # Otherwise we still see the default value when running seed_fu
+ ApplicationSetting.expire
+
+ yield
+ ensure
+ Gitlab::CurrentSettings.current_application_settings.update_columns(gitaly_timeout_default: old_timeout)
+ ApplicationSetting.expire
+ end
+
def self.mute_notifications
NotificationService.prepend(MuteNotifications)
end