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