diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-08-01 19:05:02 +0700 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-08-22 10:28:12 +0700 |
commit | d78f0724d9cc3dd7c1f22cef54ad59f8d2b579c4 (patch) | |
tree | 02532652d5b7b0772c9d59af4c9d3585a8f185ec /app/workers/ci | |
parent | da9606512846aca61fb52f8afd6e9742426f8e3a (diff) | |
download | gitlab-ce-d78f0724d9cc3dd7c1f22cef54ad59f8d2b579c4.tar.gz |
Avoid conflicts between ArchiveTraceWorkersavoid-race-condition-of-archive-trace-cron-worker
This commits avoiding conflicts between ArchiveTraceWorker
and ArchiveTracesCronWorker by changing the target of the
latter worker.
Diffstat (limited to 'app/workers/ci')
-rw-r--r-- | app/workers/ci/archive_traces_cron_worker.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/ci/archive_traces_cron_worker.rb b/app/workers/ci/archive_traces_cron_worker.rb index 75e68d0233a..ef2da729705 100644 --- a/app/workers/ci/archive_traces_cron_worker.rb +++ b/app/workers/ci/archive_traces_cron_worker.rb @@ -10,7 +10,7 @@ module Ci # Archive stale live traces which still resides in redis or database # This could happen when ArchiveTraceWorker sidekiq jobs were lost by receiving SIGKILL # More details in https://gitlab.com/gitlab-org/gitlab-ce/issues/36791 - Ci::Build.finished.with_live_trace.find_each(batch_size: 100) do |build| + 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 |