Add puma config

This commit is contained in:
Artur Beljajev 2017-05-14 18:37:55 +03:00
parent b478712f7c
commit 924e6c037a

14
config/puma.rb Normal file
View file

@ -0,0 +1,14 @@
preload_app!
threads 1, 4
workers 2
on_worker_boot do
ActiveSupport.on_load(:active_record) do
ActiveRecord::Base.establish_connection
end
end
before_fork do
ActiveRecord::Base.connection_pool.disconnect!
end