3 # DO NOT EDIT - This file is being maintained by Chef
7 <% node[:tile][:styles].each_key do |style| -%>
9 # Define function to update tiles from z0 to z12 for style "<%= style %>"
10 function update_<%= style %>
13 --timestamp=${timestamp} \
14 --tile-dir=/srv/tile.openstreetmap.org/tiles \
15 --socket=/run/renderd/renderd.sock \
16 --num-threads=<%= @threads %> \
17 --map="<%= style %>" \
18 --max-load=<%= node.cpu_cores - 1 %> \
19 --min-zoom=0 --max-zoom=12
25 # Loop running the update command until it succeeds
26 until update_<%= style %>
29 if [ "$count" -ge "$max_tries" ]; then
30 echo "Aborting <%= style %> after $max_tries failed attempts"