X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/468dde2d236ea2cbcfcecef05cb17d2261f117ea..0d8030b3a7ec9eaa6bc96c7dd39d835a00a7ace0:/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..2f6a97d77 100644 --- a/cookbooks/tile/templates/default/expire-tiles.erb +++ b/cookbooks/tile/templates/default/expire-tiles.erb @@ -2,14 +2,14 @@ # DO NOT EDIT - This file is being maintained by Chef -require 'expire' - -tile_dirs = [ +args = [ <% node[:tile][:styles].each do |name,details| -%> - "/srv/tile.openstreetmap.org/tiles/<%= name %>", + "-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, tile_dirs) +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