Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #23 from wohali/master

[COOK-2599] gunicorn provider fails if no node['cpu']['total']
  • Loading branch information...
commit 14141b716522127a201162a0f6283e76891b08af 2 parents eb3a44b + e790537
@jtimberman jtimberman authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  resources/gunicorn.rb
View
2  resources/gunicorn.rb
@@ -26,7 +26,7 @@
attribute :host, :kind_of => String, :default => '0.0.0.0'
attribute :port, :kind_of => Integer, :default => 8080
attribute :backlog, :kind_of => Integer, :default => 2048
-attribute :workers, :kind_of => Integer, :default => [node['cpu']['total'].to_i * 4, 8].min
+attribute :workers, :kind_of => Integer, :default => (node['cpu'] && node['cpu']['total']) && [node['cpu']['total'].to_i * 4, 8].min || 8
attribute :worker_class, :kind_of => [String, Symbol], :default => :sync
attribute :worker_connections, :kind_of => Integer, :default => 1000
attribute :max_requests, :kind_of => Integer, :default => 0
Please sign in to comment.
Something went wrong with that request. Please try again.