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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-23 15:08:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-23 15:08:38 +0300
commit5ad0cf26551baff8f08af8562a8d45e6ec14d71a (patch)
tree57f1a6bad31bcd11efacd3fdfb9cc92f88fb6a86 /lib/gitlab/gpg.rb
parentf47c768fad17d4c876e96524f83f8306f071db66 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/gpg.rb')
-rw-r--r--lib/gitlab/gpg.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/gpg.rb b/lib/gitlab/gpg.rb
index 7e6f6a519a6..8166bef4510 100644
--- a/lib/gitlab/gpg.rb
+++ b/lib/gitlab/gpg.rb
@@ -6,7 +6,7 @@ module Gitlab
CleanupError = Class.new(StandardError)
BG_CLEANUP_RUNTIME_S = 10
- FG_CLEANUP_RUNTIME_S = 0.5
+ FG_CLEANUP_RUNTIME_S = 1
MUTEX = Mutex.new
@@ -127,7 +127,10 @@ module Gitlab
# error.
# Failing to remove the tmp directory could leave the `gpg-agent` process
# running forever.
- Retriable.retriable(max_elapsed_time: cleanup_time, base_interval: 0.1) do
+ #
+ # 15 tries will never complete within the maximum time with exponential
+ # backoff. So our limit is the runtime, not the number of tries.
+ Retriable.retriable(max_elapsed_time: cleanup_time, base_interval: 0.1, tries: 15) do
FileUtils.remove_entry(tmp_dir) if File.exist?(tmp_dir)
end
rescue => e