When a style changes rerender zooms 0-10 before updating the timestamp
[chef.git] / cookbooks / tile / templates / default / render-lowzoom.erb
1 #!/bin/bash
2
3 # DO NOT EDIT - This file is being maintained by Chef
4
5 echo $$ > /var/run/render-lowzoom.pid
6 <% node[:tile][:styles].each do |name,details| -%>
7
8 project="/srv/tile.openstreetmap.org/styles/<%= name %>/project.mml"
9
10 render_old \
11   --config=/etc/renderd.conf \
12   --tile-dir=/srv/tile.openstreetmap.org/tiles \
13   --socket=/var/run/renderd/renderd.sock \
14   --num-threads=<%= ( node[:cpu][:total] - 2 ) / 4 %> \
15   --map="<%= name %>" \
16   --timestamp=$(stat --printf=%Y ${project}) \
17   --min-zoom=0 --max-zoom=10
18
19 touch --reference="$project" "/srv/tile.openstreetmap.org/tiles/<%= name %>/planet-import-complete"
20 <% end -%>
21
22 rm -f /var/run/render-lowzoom.pid
23
24 exit 0