Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-02-16 18:00:40 +0300
committerRémy Coutable <remy@rymai.me>2017-02-16 18:00:40 +0300
commitd8752015b34a542b1412065f375d869178e70761 (patch)
tree019877ac1b11b96968a43b8c572c0c5d7e5cbc3d /lib/gitlab/shell.rb
parentf15340e044391945a5bee6f135a453ff7e05b270 (diff)
parent21aafcfc899d34f296ddd1e3380970dbe01397f6 (diff)
Merge branch 'fix/import-hooks' into 'master'
Fix import webhooks performance issue Closes #27958 See merge request !9197
Diffstat (limited to 'lib/gitlab/shell.rb')
-rw-r--r--lib/gitlab/shell.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb
index 942cedd6cd4..3faa336f142 100644
--- a/lib/gitlab/shell.rb
+++ b/lib/gitlab/shell.rb
@@ -80,8 +80,10 @@ module Gitlab
# import_repository("/path/to/storage", "gitlab/gitlab-ci", "https://github.com/randx/six.git")
#
def import_repository(storage, name, url)
+ # Timeout should be less than 900 ideally, to prevent the memory killer
+ # to silently kill the process without knowing we are timing out here.
output, status = Popen::popen([gitlab_shell_projects_path, 'import-project',
- storage, "#{name}.git", url, '900'])
+ storage, "#{name}.git", url, '800'])
raise Error, output unless status.zero?
true
end