A platform for community discussion. Free, open, simple.
Rescue from read and connect timeouts when migration url site settings.
Guo Xiang Tan777364df0136
diff --git a/db/post_migrate/20181112013117_migrate_url_site_settings.rb b/db/post_migrate/20181112013117_migrate_url_site_settings.rbindex fbb0f5a603d..fac8fad4fb4 100644--- a/db/post_migrate/20181112013117_migrate_url_site_settings.rb+++ b/db/post_migrate/20181112013117_migrate_url_site_settings.rb@@ -33,10 +33,10 @@ class MigrateUrlSiteSettings < ActiveRecord::Migration[5.2]skip_rate_limit: true,follow_redirect: true)- rescue OpenURI::HTTPError => e+ rescue OpenURI::HTTPError, Net::OpenTimeout, Net::ReadTimeout => elogger.info("HTTP error encountered when trying to download file " +- "for #{new_setting}.\n#{e.message}"+ "for #{new_setting}.\n#{e.class}: #{e.message}\n#{e.backtrace.join("\n")}")end