TEMP: log information when failing to download db

This commit is contained in:
Régis Hanol 2019-05-24 17:26:04 +02:00
parent e20c30987c
commit 9ed2c54e27
1 changed files with 7 additions and 2 deletions

View File

@ -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