From f1de4c80735b106fe4b7951ece4367bb20522bac Mon Sep 17 00:00:00 2001 From: f Date: Wed, 28 Feb 2024 12:32:59 -0300 Subject: [PATCH] fix: ignorar instancias que ya no existen --- app/jobs/activity_pub/instance_fetch_job.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/jobs/activity_pub/instance_fetch_job.rb b/app/jobs/activity_pub/instance_fetch_job.rb index ce202092..9c562f7d 100644 --- a/app/jobs/activity_pub/instance_fetch_job.rb +++ b/app/jobs/activity_pub/instance_fetch_job.rb @@ -21,6 +21,16 @@ class ActivityPub instance.update(content: response.parsed_response.object) + break + rescue BRS::BaseError, + Errno::ECONNREFUSED, + HTTParty::Error, + JSON::JSONError, + Net::OpenTimeout, + OpenSSL::OpenSSLError, + SocketError, + Errno::ENETUNREACH => e + ExceptionNotifier.notify_exception(e, data: { instance: uri }) break end end