mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
TEMP: log more information when failing to download db
This commit is contained in:
@ -29,6 +29,9 @@ class DiscourseIpInfo
|
|||||||
|
|
||||||
uri = URI("https://geolite.maxmind.com/download/geoip/database/#{name}.tar.gz")
|
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 = Tempfile.new
|
||||||
tar_gz_file.binmode
|
tar_gz_file.binmode
|
||||||
tar_gz_file.write(Net::HTTP.get(uri))
|
tar_gz_file.write(Net::HTTP.get(uri))
|
||||||
|
@ -169,7 +169,8 @@ task 'assets:precompile' => 'assets:precompile:before' do
|
|||||||
DiscourseIpInfo.mmdb_download('GeoLite2-City')
|
DiscourseIpInfo.mmdb_download('GeoLite2-City')
|
||||||
DiscourseIpInfo.mmdb_download('GeoLite2-ASN')
|
DiscourseIpInfo.mmdb_download('GeoLite2-ASN')
|
||||||
rescue => e
|
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")
|
puts e.backtrace.join("\n")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user