mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Rescue from read and connect timeouts when migration url site settings.
This commit is contained in:
@@ -33,10 +33,10 @@ class MigrateUrlSiteSettings < ActiveRecord::Migration[5.2]
|
|||||||
skip_rate_limit: true,
|
skip_rate_limit: true,
|
||||||
follow_redirect: true
|
follow_redirect: true
|
||||||
)
|
)
|
||||||
rescue OpenURI::HTTPError => e
|
rescue OpenURI::HTTPError, Net::OpenTimeout, Net::ReadTimeout => e
|
||||||
logger.info(
|
logger.info(
|
||||||
"HTTP error encountered when trying to download file " +
|
"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
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user