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:
Diffstat (limited to 'app/workers/background_migration_worker.rb')
-rw-r--r--app/workers/background_migration_worker.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/workers/background_migration_worker.rb b/app/workers/background_migration_worker.rb
index bff864ba420..74a12dbff77 100644
--- a/app/workers/background_migration_worker.rb
+++ b/app/workers/background_migration_worker.rb
@@ -23,7 +23,9 @@ class BackgroundMigrationWorker # rubocop:disable Scalability/IdempotentWorker
#
# class_name - The class name of the background migration to run.
# arguments - The arguments to pass to the migration class.
- def perform(class_name, arguments = [])
+ # lease_attempts - The number of times we will try to obtain an exclusive
+ # lease on the class before running anyway. Pass 0 to always run.
+ def perform(class_name, arguments = [], lease_attempts = 5)
with_context(caller_id: class_name.to_s) do
should_perform, ttl = perform_and_ttl(class_name)