]> git.openstreetmap.org Git - chef.git/commitdiff
Process the expiry queue in order
authorTom Hughes <tom@compton.nu>
Thu, 16 Jul 2020 16:58:15 +0000 (17:58 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 16 Jul 2020 16:58:15 +0000 (17:58 +0100)
cookbooks/tile/templates/default/expire-tiles.erb

index 2f6a97d773ee9ddb27ab442477327f0ab04bcca9..3a023d6b2bb71ee85d372997ab1f39522f92a2f9 100644 (file)
@@ -10,6 +10,6 @@ args = [
   "--max", "<%= node[:tile][:styles].collect { |n,d| d[:max_zoom] }.max %>"
 ]
 
   "--max", "<%= node[:tile][:styles].collect { |n,d| d[:max_zoom] }.max %>"
 ]
 
-Dir.glob("/var/lib/replicate/expire-queue/changes-*.gz").each do |f|
+Dir.glob("/var/lib/replicate/expire-queue/changes-*.gz").sort.each do |f|
    system("/usr/local/bin/expire-tiles-single", *args, f) && File::unlink(f)
 end
    system("/usr/local/bin/expire-tiles-single", *args, f) && File::unlink(f)
 end