summaryrefslogtreecommitdiff
path: root/app/workers/ci
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-07-04 16:11:57 +0900
committerShinya Maeda <shinya@gitlab.com>2018-07-05 10:52:50 +0900
commit68d5793985d36fc649cf7bc0e81b5ef988bca8b1 (patch)
tree226943200877719cb0c56711de4442982afd7566 /app/workers/ci
parentd86bed76500350ab167cb4520fab038bdb7ead81 (diff)
downloadgitlab-ce-68d5793985d36fc649cf7bc0e81b5ef988bca8b1.tar.gz
Fix spec
Diffstat (limited to 'app/workers/ci')
-rw-r--r--app/workers/ci/archive_traces_cron_worker.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/workers/ci/archive_traces_cron_worker.rb b/app/workers/ci/archive_traces_cron_worker.rb
index 3fdfefba46d..eca1c681b23 100644
--- a/app/workers/ci/archive_traces_cron_worker.rb
+++ b/app/workers/ci/archive_traces_cron_worker.rb
@@ -11,8 +11,10 @@ module Ci
# 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|
begin
- build.trace.archive! unless build.job_artifacts_trace
+ build.trace.archive!
rescue => e
+ next if e.message.include?('Already archived')
+
failed_archive_counter.increment
Rails.logger.error "Failed to archive stale live trace. id: #{build.id} message: #{e.message}"
end