forked from saurabh/orbit4-5
change unicorn num of workers to num of cpu cores
This commit is contained in:
parent
35ada57dbb
commit
8bdc32ec30
|
@ -4,7 +4,10 @@
|
|||
rails_root = `pwd`.gsub("\n", "")
|
||||
|
||||
rails_env = ENV['RAILS_ENV'] || 'production'
|
||||
worker_processes (rails_env == 'production' ? 4 : 2)
|
||||
|
||||
cpu_cores = %x(cat /proc/cpuinfo | grep processor | wc -l).sub("\n",'').to_i rescue 2
|
||||
|
||||
worker_processes (rails_env == 'production' ? cpu_cores : 1)
|
||||
|
||||
# preload_app true
|
||||
|
||||
|
|
Loading…
Reference in New Issue