]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/update-lowzoom.erb
tile: Fix Mac ARM compatibility 2nd bit
[chef.git] / cookbooks / tile / templates / default / update-lowzoom.erb
index ce91eb48fafa98e902ee11299899d7cd83b36742..4f2821dba4ead51c6674a1dffc4ec07538ba5495 100644 (file)
@@ -12,9 +12,9 @@ function update_tiles
     --timestamp=$(stat -c %Y "/srv/tile.openstreetmap.org/styles/<%= @style %>/project.xml") \
     --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=70 \
+    --max-load=<%= [4, node.dig('cpu', 'total').to_i, node.dig('cpu', 'cores').to_i].max %> \
     --min-zoom=0 --max-zoom=12
 }