Created
September 24, 2018 12:34
-
-
Save sevenmaxis/870416b817e184139710c5efd95c32ee to your computer and use it in GitHub Desktop.
Additional config for puma server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment