Catch ArchiveError and ignore errors if it's already archived

This commit is contained in:
Shinya Maeda 2018-07-02 16:18:16 +09:00
parent 116955c453
commit 9bf810a9f8
1 changed files with 3 additions and 1 deletions

View File

@ -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