DEV: remove temporary rescue when downloading MaxMindDB
follow-up 8c8c925d1b
This commit is contained in:
parent
049561ac49
commit
a51e2271af
|
@ -25,7 +25,6 @@ class DiscourseIpInfo
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.mmdb_download(name)
|
def self.mmdb_download(name)
|
||||||
begin
|
|
||||||
FileUtils.mkdir_p(path)
|
FileUtils.mkdir_p(path)
|
||||||
|
|
||||||
uri = URI("https://geolite.maxmind.com/download/geoip/database/#{name}.tar.gz")
|
uri = URI("https://geolite.maxmind.com/download/geoip/database/#{name}.tar.gz")
|
||||||
|
@ -48,13 +47,10 @@ class DiscourseIpInfo
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
rescue => e
|
|
||||||
STDERR.puts("There was an error downloading MaxMindDB (#{name}): #{e}")
|
|
||||||
ensure
|
ensure
|
||||||
FileUtils.rm_rf(dest) if dest
|
FileUtils.rm_rf(dest) if dest
|
||||||
FileUtils.rm(tar_gz_file) if tar_gz_file
|
FileUtils.rm(tar_gz_file) if tar_gz_file
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def mmdb_load(filepath)
|
def mmdb_load(filepath)
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in New Issue