FIX: `next` vs `return` in maxmind task (#23196)
(and added the dependence on `environment` for trying the task independently of `assets:precompile`)
This commit is contained in:
parent
68eba53e09
commit
9b63ac473b
|
@ -38,9 +38,9 @@ end
|
|||
|
||||
maxmind_thread = nil
|
||||
|
||||
task "maxminddb:refresh" do
|
||||
task "maxminddb:refresh": "environment" do
|
||||
refresh_days = GlobalSetting.refresh_maxmind_db_during_precompile_days
|
||||
return if refresh_days.to_i <= 0
|
||||
next if refresh_days.to_i <= 0
|
||||
|
||||
mmdb_time = get_mmdb_time(DiscourseIpInfo.path)
|
||||
|
||||
|
@ -54,7 +54,7 @@ task "maxminddb:refresh" do
|
|||
mmdb_time = backup_mmdb_time
|
||||
end
|
||||
|
||||
return if mmdb_time && mmdb_time >= refresh_days.days.ago
|
||||
next if mmdb_time && mmdb_time >= refresh_days.days.ago
|
||||
|
||||
puts "Downloading MaxMindDB..."
|
||||
|
||||
|
|
Loading…
Reference in New Issue