diff options
Diffstat (limited to 'app/workers/ci/archive_traces_cron_worker.rb')
-rw-r--r-- | app/workers/ci/archive_traces_cron_worker.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/app/workers/ci/archive_traces_cron_worker.rb b/app/workers/ci/archive_traces_cron_worker.rb index fe23d10c2ac..879192e67c4 100644 --- a/app/workers/ci/archive_traces_cron_worker.rb +++ b/app/workers/ci/archive_traces_cron_worker.rb @@ -11,20 +11,12 @@ module Ci feature_category :continuous_integration deduplicate :until_executed, including_scheduled: true - # rubocop: disable CodeReuse/ActiveRecord def perform # Archive stale live traces which still resides in redis or database # This could happen when Ci::ArchiveTraceWorker sidekiq jobs were lost by receiving SIGKILL # More details in https://gitlab.com/gitlab-org/gitlab-foss/issues/36791 - if Feature.enabled?(:deduplicate_archive_traces_cron_worker) - Ci::ArchiveTraceService.new.batch_execute(worker_name: self.class.name) - else - Ci::Build.with_stale_live_trace.find_each(batch_size: 100) do |build| - Ci::ArchiveTraceService.new.execute(build, worker_name: self.class.name) - end - end + Ci::ArchiveTraceService.new.batch_execute(worker_name: self.class.name) end - # rubocop: enable CodeReuse/ActiveRecord end end |