]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/expire-tiles.erb
Run the OTRS daemon as a systemd service
[chef.git] / cookbooks / tile / templates / default / expire-tiles.erb
index e9473a1a7badc3b8057dd59453549887c85a07df..3a023d6b2bb71ee85d372997ab1f39522f92a2f9 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").sort.each do |f|
+   system("/usr/local/bin/expire-tiles-single", *args, f) && File::unlink(f)
 end