From 7e9c479f7de77702622631cff2628a9c8dcbc627 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 19 Nov 2020 08:27:35 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-6-stable-ee --- app/workers/ci/build_trace_chunk_flush_worker.rb | 2 ++ app/workers/ci/delete_objects_worker.rb | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/workers/ci') diff --git a/app/workers/ci/build_trace_chunk_flush_worker.rb b/app/workers/ci/build_trace_chunk_flush_worker.rb index 89400247a7b..a63b12c0d03 100644 --- a/app/workers/ci/build_trace_chunk_flush_worker.rb +++ b/app/workers/ci/build_trace_chunk_flush_worker.rb @@ -5,6 +5,8 @@ module Ci include ApplicationWorker include PipelineBackgroundQueue + deduplicate :until_executed + idempotent! # rubocop: disable CodeReuse/ActiveRecord diff --git a/app/workers/ci/delete_objects_worker.rb b/app/workers/ci/delete_objects_worker.rb index e34be33b438..d845ad61358 100644 --- a/app/workers/ci/delete_objects_worker.rb +++ b/app/workers/ci/delete_objects_worker.rb @@ -14,18 +14,16 @@ module Ci def remaining_work_count(*args) @remaining_work_count ||= service - .remaining_batches_count(max_batch_count: remaining_capacity) + .remaining_batches_count(max_batch_count: max_running_jobs) end def max_running_jobs - if ::Feature.enabled?(:ci_delete_objects_low_concurrency) - 2 - elsif ::Feature.enabled?(:ci_delete_objects_medium_concurrency) + if ::Feature.enabled?(:ci_delete_objects_medium_concurrency) 20 elsif ::Feature.enabled?(:ci_delete_objects_high_concurrency) 50 else - 0 + 2 end end -- cgit v1.2.3