X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/d8fc1ec5f984b7ab6a7886e054c9dd272d3678b1..1874a3b948505eb5ba23d10059597d81937fa94a:/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 2c0e7406e..1af7f0a64 100644 --- a/cookbooks/tile/templates/default/expire-tiles.erb +++ b/cookbooks/tile/templates/default/expire-tiles.erb @@ -2,16 +2,16 @@ # DO NOT EDIT - This file is being maintained by Chef -require 'expire' - -tile_dirs = [ -<% node[:tile][:styles].each do |name,details| -%> - "/srv/tile.openstreetmap.org/tiles/<%= name %>", -<% end -%> +args = [ + "--socket=/var/run/renderd/renderd.sock", + "--tile-dir=/srv/tile.openstreetmap.org/tiles", + "--touch-from=13", + "--min-zoom=13" ] -max_zoom = <%= node[:tile][:styles].collect { |n,d| d[:max_zoom] }.max %> - -ARGV.each do |f| - Expire::expire(f, 13, max_zoom, tile_dirs) +Dir.glob("/var/lib/replicate/expire-queue/changes-*.txt").sort.each do |f| + <% node[:tile][:styles].each do |name,details| -%> + system("/usr/bin/render_expired", "--map=<%= name %>", *args, "--max-zoom=<%= details[:max_zoom] %>", :in=> f) && + <% end -%> + File::unlink(f) end