#!/usr/bin/ruby

# 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 -%>
]

max_zoom = <%= node[:tile][:styles].collect { |n,d| d[:max_zoom] }.max %>

Dir.glob("/var/lib/replicate/expire-queue/changes-*.osm.gz").each do |f|
   Expire::expire(f, 13, max_zoom, tile_dirs)
   File::unlink(f)
end

#!/usr/bin/ruby

# 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 -%>
]

max_zoom = <%= node[:tile][:styles].collect { |n,d| d[:max_zoom] }.max %>

Dir.glob("/var/lib/replicate/expire-queue/changes-*.gz").each do |f|
   Expire::expire(f, 13, max_zoom, tile_dirs)
   File::unlink(f)
end

Expire tiles from both osm.gz and osc.gz files
Expire tiles from both osm.gz and osc.gz files