From 81adb660514524f0250c5d07e12af39e8f6177ce Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Sat, 19 Sep 2020 19:09:30 -0500 Subject: [Rails] Handle potential errors while resolving accounts in monsterfork:refresh_application_actors --- lib/tasks/monsterfork.rake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/tasks/monsterfork.rake b/lib/tasks/monsterfork.rake index 63ce3cd4e..02ed97a9a 100644 --- a/lib/tasks/monsterfork.rake +++ b/lib/tasks/monsterfork.rake @@ -32,7 +32,11 @@ namespace :monsterfork do Account.remote.without_suspended.where(actor_type: 'Application').find_each do |account| Rails.logger.info("Refetching application actor: #{account.acct}") account.update!(last_webfingered_at: nil) - ResolveAccountService.new.call(account) + begin + ResolveAccountService.new.call(account) + rescue Goldfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::UnexpectedResponseError => e + Rails.logger.info(" Failed: #{e.class} (#{e.message})") + end end Rails.logger.info('Done!') end -- cgit