Catch ArchiveError and ignore errors if it's already archived
This commit is contained in:
parent
116955c453
commit
9bf810a9f8
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue