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/container_registry/record_data_repair_detail_worker.rb')
-rw-r--r--app/workers/container_registry/record_data_repair_detail_worker.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/workers/container_registry/record_data_repair_detail_worker.rb b/app/workers/container_registry/record_data_repair_detail_worker.rb
index f400568a3ef..390481f8e01 100644
--- a/app/workers/container_registry/record_data_repair_detail_worker.rb
+++ b/app/workers/container_registry/record_data_repair_detail_worker.rb
@@ -14,7 +14,6 @@ module ContainerRegistry
worker_resource_boundary :unknown
idempotent!
- MAX_CAPACITY = 2
LEASE_TIMEOUT = 1.hour.to_i
def perform_work
@@ -60,11 +59,15 @@ module ContainerRegistry
end
def max_running_jobs
- MAX_CAPACITY
+ current_application_settings.container_registry_data_repair_detail_worker_max_concurrency.to_i
end
private
+ def current_application_settings
+ ::Gitlab::CurrentSettings.current_application_settings
+ end
+
def next_project
Project.pending_data_repair_analysis.first
end