Browse Source

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
pull/4/head
Paul Woolcock 6 years ago
committed by Eugen Rochko
parent
commit
76198c63b6
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      lib/tasks/mastodon.rake

+ 7
- 3
lib/tasks/mastodon.rake View File

@ -494,9 +494,13 @@ namespace :mastodon do
accounts = accounts.where(domain: ENV['DOMAIN']) if ENV['DOMAIN'].present?
accounts.find_each do |account|
account.reset_avatar!
account.reset_header!
account.save
begin
account.reset_avatar!
account.reset_header!
account.save
rescue Paperclip::Error
puts "Error resetting avatar and header for account #{username}@#{domain}"
end
end
end
end

Loading…
Cancel
Save