Commit 9bf810a9 authored by Shinya Maeda's avatar Shinya Maeda

Catch ArchiveError and ignore errors if it's already archived

parent 116955c4
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment