X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/f65e6e5bdfdab789a385847963b9c1ffa799a6e3..dc2143cbc5854e68175e6f787cc5ef7064f34d74:/cookbooks/tile/templates/default/update-lowzoom.erb diff --git a/cookbooks/tile/templates/default/update-lowzoom.erb b/cookbooks/tile/templates/default/update-lowzoom.erb index 85f32c13d..4f2821dba 100644 --- a/cookbooks/tile/templates/default/update-lowzoom.erb +++ b/cookbooks/tile/templates/default/update-lowzoom.erb @@ -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=<%= node[:cpu][:total] %> \ + --max-load=<%= [4, node.dig('cpu', 'total').to_i, node.dig('cpu', 'cores').to_i].max %> \ --min-zoom=0 --max-zoom=12 }