mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-26 02:01:36 +01:00
Some images can cause convert
to fail, which crashes this whole task (#6565)
* Some images can cause `convert` to fail, which crashes this whole task * Add more specific exception
This commit is contained in:
parent
7150f2e9d3
commit
76198c63b6
1 changed files with 7 additions and 3 deletions
|
@ -494,9 +494,13 @@ namespace :mastodon do
|
||||||
accounts = accounts.where(domain: ENV['DOMAIN']) if ENV['DOMAIN'].present?
|
accounts = accounts.where(domain: ENV['DOMAIN']) if ENV['DOMAIN'].present?
|
||||||
|
|
||||||
accounts.find_each do |account|
|
accounts.find_each do |account|
|
||||||
account.reset_avatar!
|
begin
|
||||||
account.reset_header!
|
account.reset_avatar!
|
||||||
account.save
|
account.reset_header!
|
||||||
|
account.save
|
||||||
|
rescue Paperclip::Error
|
||||||
|
puts "Error resetting avatar and header for account #{username}@#{domain}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue