adopt-a-hydrant/config/unicorn.rb

17 lines
307 B
Ruby
Raw Permalink Normal View History

worker_processes 4
2015-09-04 20:28:15 +00:00
timeout 30
preload_app true
before_fork do |_server, _worker|
2015-09-04 20:28:15 +00:00
Signal.trap 'TERM' do
Process.kill 'QUIT', Process.pid
end
ActiveRecord::Base.connection.disconnect!
end
after_fork do |_server, _worker|
2015-09-04 20:28:15 +00:00
Signal.trap 'TERM' do
end
ActiveRecord::Base.establish_connection
end