Skip to content

A platform for community discussion. Free, open, simple.

TEMP: log information when failing to download db

Régis Hanol9ed2c54e2723
diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake
index 9fe3a485d60..6a197dfd7dd 100644
--- a/lib/tasks/assets.rake
+++ b/lib/tasks/assets.rake
@@ -165,8 +165,13 @@ task 'assets:precompile' => 'assets:precompile:before' do
if !mmdb_time || mmdb_time < refresh_days.days.ago
puts "Downloading MaxMindDB..."
mmdb_thread = Thread.new do
- DiscourseIpInfo.mmdb_download('GeoLite2-City')
- DiscourseIpInfo.mmdb_download('GeoLite2-ASN')
+ begin
+ DiscourseIpInfo.mmdb_download('GeoLite2-City')
+ DiscourseIpInfo.mmdb_download('GeoLite2-ASN')
+ rescue => e
+ puts "Something when wrong while downloading the MaxMindDB: #{e.message}"
+ puts e.backtrace.join("\n")
+ end
end
end
end