]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/expire-tiles.erb
Drop mod_php support
[chef.git] / cookbooks / tile / templates / default / expire-tiles.erb
index e9473a1a7badc3b8057dd59453549887c85a07df..2f6a97d773ee9ddb27ab442477327f0ab04bcca9 100644 (file)
@@ -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