X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/468dde2d236ea2cbcfcecef05cb17d2261f117ea..ae4d13c8ba1b86d2f94bcdec799d0db052425333:/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 beea05dd9..1a8a01a26 100644 --- a/cookbooks/tile/templates/default/expire-tiles.erb +++ b/cookbooks/tile/templates/default/expire-tiles.erb @@ -8,8 +8,11 @@ tile_dirs = [ <% node[:tile][:styles].each do |name,details| -%> "/srv/tile.openstreetmap.org/tiles/<%= name %>", <% end -%> -]; +] -ARGV.each do |f| - Expire::expire(f, tile_dirs) +max_zoom = <%= node[:tile][:styles].collect { |n,d| d[:max_zoom] }.max %> + +Dir.glob("/var/lib/replicate/expire-queue/changes-*.gz").each do |f| + Expire::expire(f, 13, max_zoom, tile_dirs) + File::unlink(f) end