Skip to content
Snippets Groups Projects
Commit 77f88b47 authored by Fernando Alonso's avatar Fernando Alonso
Browse files

Fix: Maxmind insert task sorts files alphabetically

parent 6a983d5b
No related branches found
No related tags found
No related merge requests found
...@@ -83,7 +83,7 @@ module Geocoder ...@@ -83,7 +83,7 @@ module Geocoder
case package case package
when :geolite_city_csv when :geolite_city_csv
# use the last two in case multiple versions exist # use the last two in case multiple versions exist
files = Dir.glob(File.join(dir, "GeoLiteCity_*/*.csv"))[-2..-1] files = Dir.glob(File.join(dir, "GeoLiteCity_*/*.csv"))[-2..-1].sort
Hash[*files.zip(["maxmind_geolite_city_blocks", "maxmind_geolite_city_location"]).flatten] Hash[*files.zip(["maxmind_geolite_city_blocks", "maxmind_geolite_city_location"]).flatten]
when :geolite_country_csv when :geolite_country_csv
{File.join(dir, "GeoIPCountryWhois.csv") => "maxmind_geolite_country"} {File.join(dir, "GeoIPCountryWhois.csv") => "maxmind_geolite_country"}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment