]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/render-lowzoom.erb
tile: Fix Mac ARM compatibility 2nd bit
[chef.git] / cookbooks / tile / templates / default / render-lowzoom.erb
index de64cbcea758b2629cbc7950ad64833a5185e8b6..779730d1e8ead6785fe3579afc4ccd40f1183ca3 100644 (file)
@@ -13,12 +13,12 @@ timestamp=$(date +%s)
 function update_<%= style %>
 {
   render_old \
-    --timestamp=${timestamp} \        
+    --timestamp=${timestamp} \
     --tile-dir=/srv/tile.openstreetmap.org/tiles \
     --socket=/var/run/renderd/renderd.sock \
-    --num-threads=<%= node[:cpu][:total] - 2 %> \
+    --num-threads=<%= [4, node.dig('cpu', 'total').to_i - 1, node.dig('cpu', 'cores').to_i - 1].max %> \
     --map="<%= style %>" \
-    --max-load=70 \
+    --max-load=<%= [4, node.dig('cpu', 'total').to_i, node.dig('cpu', 'cores').to_i].max %> \
     --min-zoom=0 --max-zoom=12
 }