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:
authorLin Jen-Shin <godfat@godfat.org>2019-09-03 09:31:58 +0300
committerLin Jen-Shin <godfat@godfat.org>2019-09-03 09:31:58 +0300
commitabd9e842720fc434c643cfe3f1662923c92f68f3 (patch)
tree2af7e16240c559b83f25e86968214f38590aea4f /lib/gitlab
parent991143eb1f1bb5cda1f709ad44fdc021aa12b75d (diff)
parent6889196116140577e2bce62be0a7784dbfa6e4ff (diff)
Merge branch 'ce-12996-cancel-redundant-pipelines' into 'master'
Backport retries options for cancel_running See merge request gitlab-org/gitlab-ce!32525
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/optimistic_locking.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/optimistic_locking.rb b/lib/gitlab/optimistic_locking.rb
index 0c0f46d3b77..d51d718c826 100644
--- a/lib/gitlab/optimistic_locking.rb
+++ b/lib/gitlab/optimistic_locking.rb
@@ -4,7 +4,8 @@ module Gitlab
module OptimisticLocking
module_function
- def retry_lock(subject, retries = 100, &block)
+ def retry_lock(subject, retries = nil, &block)
+ retries ||= 100
# TODO(Observability): We should be recording details of the number of retries and the duration of the total execution here
ActiveRecord::Base.transaction do
yield(subject)