From 8c9ffee3af89bf60803aeb3b9df628515bc39805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Fri, 24 May 2019 17:33:52 +0200 Subject: [PATCH] TEMP: log more information when failing to download db --- lib/discourse_ip_info.rb | 3 +++ lib/tasks/assets.rake | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/discourse_ip_info.rb b/lib/discourse_ip_info.rb index c2c72db9081..5323bb2caee 100644 --- a/lib/discourse_ip_info.rb +++ b/lib/discourse_ip_info.rb @@ -29,6 +29,9 @@ class DiscourseIpInfo uri = URI("https://geolite.maxmind.com/download/geoip/database/#{name}.tar.gz") + puts uri + puts "SIZE: #{Net::HTTP.get(uri).size}" + tar_gz_file = Tempfile.new tar_gz_file.binmode tar_gz_file.write(Net::HTTP.get(uri)) diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index 6a197dfd7dd..d01b340e946 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -169,7 +169,8 @@ task 'assets:precompile' => 'assets:precompile:before' do DiscourseIpInfo.mmdb_download('GeoLite2-City') DiscourseIpInfo.mmdb_download('GeoLite2-ASN') rescue => e - puts "Something when wrong while downloading the MaxMindDB: #{e.message}" + puts "Something when wrong while downloading the MaxMindDB" + puts e.message puts e.backtrace.join("\n") end end