Skip to content

Instantly share code, notes, and snippets.

@sevenmaxis
Created September 24, 2018 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sevenmaxis/870416b817e184139710c5efd95c32ee to your computer and use it in GitHub Desktop.
Save sevenmaxis/870416b817e184139710c5efd95c32ee to your computer and use it in GitHub Desktop.
Additional config for puma server
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