fix(maintenance task): catch active storage errors
This commit is contained in:
parent
6dc8496d3d
commit
ad7f01f97b
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ module Maintenance
|
|||
attachments.each do |attachment|
|
||||
next if !(attachment.previewable? && attachment.representation_required?)
|
||||
attachment.preview(resize_to_limit: [400, 400]).processed unless attachment.preview(resize_to_limit: [400, 400]).image.attached?
|
||||
rescue MiniMagick::Error
|
||||
rescue MiniMagick::Error, ActiveStorage::Error
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -32,7 +32,7 @@ module Maintenance
|
|||
if attachment.blob.content_type.in?(RARE_IMAGE_TYPES) && attachment.variant(resize_to_limit: [2000, 2000]).key.nil?
|
||||
attachment.variant(resize_to_limit: [2000, 2000]).processed
|
||||
end
|
||||
rescue MiniMagick::Error
|
||||
rescue MiniMagick::Error, ActiveStorage::Error
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue