Commit 1a32d537a5740d3dd7474a4f1a779e386478d04d
1 parent
ececa72a
Exists in
production
versão errbit pronta
Showing
1 changed file
with
8 additions
and
2 deletions
Show diff stats
config/unicorn.rb
1 | # http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the-new-celadon-cedar-stack/ | 1 | # http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the-new-celadon-cedar-stack/ |
2 | 2 | ||
3 | -worker_processes ENV['ERRBIT_UNICORN_WORKER_PROCESSES'] # amount of unicorn workers to spin up | 3 | +worker_processes_value = 1 |
4 | +worker_processes_value = ENV["ERRBIT_UNICORN_WORKER_PROCESSES"].to_i unless ENV["ERRBIT_UNICORN_WORKER_PROCESSES"] | ||
5 | + | ||
6 | + | ||
7 | +worker_processes worker_processes_value # amount of unicorn workers to spin up | ||
8 | + | ||
4 | timeout 30 # restarts workers that hang for 30 seconds | 9 | timeout 30 # restarts workers that hang for 30 seconds |
10 | + | ||
5 | preload_app true | 11 | preload_app true |
6 | 12 | ||
7 | -listen "${ENV['ERRBIT_UNICORN_BIND_ADDRESS'}:${ENV['ERRBIT_UNICORN_PORT']}" | 13 | +listen "#{ENV['ERRBIT_UNICORN_BIND_ADDRESS']}:#{ENV['ERRBIT_UNICORN_PORT']}" |
8 | 14 | ||
9 | pid ENV['ERRBIT_UNICORN_PID'] | 15 | pid ENV['ERRBIT_UNICORN_PID'] |
10 | 16 |