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-02 10:18:16 +0300
committerShinya Maeda <shinya@gitlab.com>2018-07-05 04:52:50 +0300
commit9bf810a9f85343993d2767b2f81185b24049b5e4 (patch)
treeae4182faaae0ea1f5ec1aa68790e5f17b8cab61a /app/workers/ci
parent116955c4533497e68abbddbace2eae0a07c98569 (diff)
Catch ArchiveError and ignore errors if it's already archived
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 7016edde698..9bee4fe6cc5 100644
--- a/app/workers/ci/archive_traces_cron_worker.rb
+++ b/app/workers/ci/archive_traces_cron_worker.rb
@@ -12,7 +12,9 @@ module Ci
Ci::Build.finished.with_live_trace.find_each(batch_size: 100) do |build|
begin
build.trace.archive!
- rescue => e
+ rescue ArchiveError => 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