mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 14:17:57 +08:00
DEV: use FileHelper to download MaxMindDB
This commit is contained in:
@ -165,14 +165,8 @@ task 'assets:precompile' => 'assets:precompile:before' do
|
||||
if !mmdb_time || mmdb_time < refresh_days.days.ago
|
||||
puts "Downloading MaxMindDB..."
|
||||
mmdb_thread = Thread.new do
|
||||
begin
|
||||
DiscourseIpInfo.mmdb_download('GeoLite2-City')
|
||||
DiscourseIpInfo.mmdb_download('GeoLite2-ASN')
|
||||
rescue => e
|
||||
puts "Something when wrong while downloading the MaxMindDB"
|
||||
puts e.message
|
||||
puts e.backtrace.join("\n")
|
||||
end
|
||||
DiscourseIpInfo.mmdb_download('GeoLite2-City')
|
||||
DiscourseIpInfo.mmdb_download('GeoLite2-ASN')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user