Rescue from `SocketError` in migrate url onceoff job

Rescue from SocketError in migrate url onceoff job.

From 9fd704735e5fae1b8bea19d63d5ea10c2d1c0462 Mon Sep 17 00:00:00 2001
From: Guo Xiang Tan <tgx_world@hotmail.com>
Date: Mon, 19 Nov 2018 13:07:34 +0800
Subject: [PATCH] Rescue from `SocketError` in migrate url onceoff job.


diff --git a/app/jobs/onceoff/migrate_url_site_settings.rb b/app/jobs/onceoff/migrate_url_site_settings.rb
index dea7437..22a3f59 100644
--- a/app/jobs/onceoff/migrate_url_site_settings.rb
+++ b/app/jobs/onceoff/migrate_url_site_settings.rb
@@ -43,6 +43,7 @@ module Jobs
                  Net::OpenTimeout,
                  Net::ReadTimeout,
                  Errno::ECONNREFUSED,
+                 SocketError,
                  Discourse::InvalidParameters => e
 
             logger.info(

GitHub

Maybe we should log a warning here, so we can potentially proactively reach out to sites with broken logos and so on?

1 Like