X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/8e9e103e9f748fe7a104c4fba00cc72a847e2d3a..f641d2cbbfa4ec59daf819b72c2ca71acb85ee5d:/cookbooks/tile/templates/default/expire-tiles.erb?ds=sidebyside diff --git a/cookbooks/tile/templates/default/expire-tiles.erb b/cookbooks/tile/templates/default/expire-tiles.erb index e9473a1a7..2f6a97d77 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").each do |f| + system("/usr/local/bin/expire-tiles-single", *args, f) && File::unlink(f) end