X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/8e9e103e9f748fe7a104c4fba00cc72a847e2d3a..06ab8b35ae718f27206f7244f944308f6f52b540:/cookbooks/tile/templates/default/expire-tiles.erb diff --git a/cookbooks/tile/templates/default/expire-tiles.erb b/cookbooks/tile/templates/default/expire-tiles.erb index e9473a1a7..3a023d6b2 100644 --- a/cookbooks/tile/templates/default/expire-tiles.erb +++ b/cookbooks/tile/templates/default/expire-tiles.erb @@ -2,8 +2,14 @@ # DO NOT EDIT - This file is being maintained by Chef -require 'expire' +args = [ +<% node[:tile][:styles].each do |name,details| -%> + "-t", "/srv/tile.openstreetmap.org/tiles/<%= name %>", +<% end -%> + "--min", "13", + "--max", "<%= node[:tile][:styles].collect { |n,d| d[:max_zoom] }.max %>" +] -ARGV.each do |f| - Expire::expire(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