0
0
Fork 0

Fix #1972, fix #1870 - Fix special characters in XML, add tests (#1988)

Also improve efficiency of the mastodon:maintenance:add_static_avatars task
This commit is contained in:
Eugen 2017-04-17 19:58:54 +02:00 committed by GitHub
parent e43071a2f9
commit 15ec4ae07b
3 changed files with 6 additions and 8 deletions

View file

@ -145,8 +145,8 @@ namespace :mastodon do
Account.unscoped.where(avatar_content_type: 'image/gif').or(Account.unscoped.where(header_content_type: 'image/gif')).find_each do |account|
begin
account.avatar.reprocess!
account.header.reprocess!
account.avatar.reprocess! if account.avatar_content_type == 'image/gif' && !account.avatar.exists?(:static)
account.header.reprocess! if account.header_content_type == 'image/gif' && !account.header.exists?(:static)
rescue StandardError => e
Rails.logger.error "Error while generating static avatars/headers for account #{account.id}: #{e}"
next