]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/expire-tiles.erb
Set a limit on expiring long way segments
[chef.git] / cookbooks / tile / templates / default / expire-tiles.erb
index 2f6a97d773ee9ddb27ab442477327f0ab04bcca9..1af7f0a64dd426e2257bc41c5fe801df705eb430 100644 (file)
@@ -3,13 +3,15 @@
 # DO NOT EDIT - This file is being maintained by Chef
 
 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 %>"
+  "--socket=/var/run/renderd/renderd.sock",
+  "--tile-dir=/srv/tile.openstreetmap.org/tiles",
+  "--touch-from=13",
+  "--min-zoom=13"
 ]
 
-Dir.glob("/var/lib/replicate/expire-queue/changes-*.gz").each do |f|
-   system("/usr/local/bin/expire-tiles-single", *args, f) && File::unlink(f)
+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