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:
authorShinya Maeda <shinya@gitlab.com>2018-07-04 08:20:37 +0300
committerShinya Maeda <shinya@gitlab.com>2018-07-05 04:52:50 +0300
commit647106fec7db265e555988c949f722b8ee2c00e3 (patch)
treebf78e70c7767b658bfc14cccd64dbce126d837b1 /app/workers/ci
parent9bf810a9f85343993d2767b2f81185b24049b5e4 (diff)
Check if trace exists before process `archive!` method
Diffstat (limited to 'app/workers/ci')
-rw-r--r--app/workers/ci/archive_traces_cron_worker.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/workers/ci/archive_traces_cron_worker.rb b/app/workers/ci/archive_traces_cron_worker.rb
index 9bee4fe6cc5..3fdfefba46d 100644
--- a/app/workers/ci/archive_traces_cron_worker.rb
+++ b/app/workers/ci/archive_traces_cron_worker.rb
@@ -11,10 +11,8 @@ 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!
- rescue ArchiveError => e
- next if e.message.include?('Already archived')
-
+ build.trace.archive! unless build.job_artifacts_trace
+ rescue => e
failed_archive_counter.increment
Rails.logger.error "Failed to archive stale live trace. id: #{build.id} message: #{e.message}"
end