diff options
author | Starfall <us@starfall.systems> | 2021-05-17 21:12:45 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2021-05-17 21:12:45 -0500 |
commit | 2c6fcb9cf8fbb09e900fc3625837529155f98f4f (patch) | |
tree | b78e5204ef455b25c06cde33e8a6846ac46fcdbf /app/services/activitypub/process_account_service.rb | |
parent | 2523b046523f92ccf12756dce0204926433d1c7f (diff) | |
parent | 567745c1e66593ef46a86dc0bcfe824cefb04f14 (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/services/activitypub/process_account_service.rb')
-rw-r--r-- | app/services/activitypub/process_account_service.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index 2c80175e7..2161b91ee 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -107,8 +107,16 @@ class ActivityPub::ProcessAccountService < BaseService end def set_fetchable_attributes! - @account.avatar_remote_url = image_url('icon') || '' unless skip_download? - @account.header_remote_url = image_url('image') || '' unless skip_download? + begin + @account.avatar_remote_url = image_url('icon') || '' unless skip_download? + rescue Mastodon::UnexpectedResponseError, HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError + RedownloadAvatarWorker.perform_in(rand(30..600).seconds, @account.id) + end + begin + @account.header_remote_url = image_url('image') || '' unless skip_download? + rescue Mastodon::UnexpectedResponseError, HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError + RedownloadHeaderWorker.perform_in(rand(30..600).seconds, @account.id) + end @account.statuses_count = outbox_total_items if outbox_total_items.present? @account.following_count = following_total_items if following_total_items.present? @account.followers_count = followers_total_items if followers_total_items.present? |