]> git.openstreetmap.org Git - chef.git/blob - cookbooks/chef/libraries/cpu.rb
nominatim: switch to deploy tag for QA repo
[chef.git] / cookbooks / chef / libraries / cpu.rb
1 module OpenStreetMap
2   module Mixin
3     module CPU
4       def cpu_cores
5         [dig("cpu", "total").to_i, dig("cpu", "cores").to_i, 4].max
6       end
7     end
8   end
9 end
10
11 Chef::Node.include(OpenStreetMap::Mixin::CPU)