mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: MaxMindDB download failures caused a crash on rebuild (#20737)
We did not properly define the "name" variable leading to the error handling to crash. This quick fix ensures it can gracefully fail.
This commit is contained in:
parent
4a3c13a37b
commit
0364ef5efe
@ -277,8 +277,12 @@ task "assets:precompile" => "assets:precompile:before" do
|
||||
puts "Downloading MaxMindDB..."
|
||||
mmdb_thread =
|
||||
Thread.new do
|
||||
name = "unknown"
|
||||
begin
|
||||
geolite_dbs.each { |db| DiscourseIpInfo.mmdb_download(db) }
|
||||
geolite_dbs.each do |db|
|
||||
name = db
|
||||
DiscourseIpInfo.mmdb_download(db)
|
||||
end
|
||||
|
||||
if GlobalSetting.maxmind_backup_path.present?
|
||||
copy_maxmind(DiscourseIpInfo.path, GlobalSetting.maxmind_backup_path)
|
||||
|
Loading…
Reference in New Issue
Block a user