Permalink
Please sign in to comment.
Showing
with
10 additions
and 22 deletions.
- +1 −1 Procfile
- +9 −0 config/puma.rb
- +0 −21 config/unicorn.rb
| @@ -0,0 +1,9 @@ | ||
| +workers Integer(ENV['WEB_CONCURRENCY'] || 2) | ||
| +threads_count = Integer(ENV['MAX_THREADS'] || 5) | ||
| +threads threads_count, threads_count | ||
| + | ||
| +preload_app! | ||
| + | ||
| +rackup DefaultRackup | ||
| +port ENV['PORT'] || 3000 | ||
| +environment ENV['RACK_ENV'] || 'development' |
| @@ -1,21 +0,0 @@ | ||
| -worker_processes Integer(ENV['UNICORN_WORKERS'] || 4) | ||
| -timeout 30 | ||
| -preload_app true | ||
| -listen(ENV['PORT'] || 3000, :backlog => Integer(ENV['UNICORN_BACKLOG'] || 200)) | ||
| - | ||
| -before_fork do |server, worker| | ||
| - Signal.trap 'TERM' do | ||
| - puts 'Unicorn master intercepting TERM and sending myself QUIT instead' | ||
| - Process.kill 'QUIT', Process.pid | ||
| - end | ||
| - | ||
| - if defined?(Sequel::Model) | ||
| - Sequel::DATABASES.each{ |db| db.disconnect } | ||
| - end | ||
| -end | ||
| - | ||
| -after_fork do |server, worker| | ||
| - Signal.trap 'TERM' do | ||
| - puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT' | ||
| - end | ||
| -end |
0 comments on commit
21f8cd4