lib/capistrano/templates/puma.rb.erb in capistrano3-puma-1.2.1 vs lib/capistrano/templates/puma.rb.erb in capistrano3-puma-2.0.0
- old
+ new
@@ -11,10 +11,12 @@
stdout_redirect '<%=fetch(:puma_access_log)%>', '<%=fetch(:puma_error_log)%>', true
threads <%=fetch(:puma_threads).join(',')%>
+<%= puma_plugins %>
+
<%= puma_bind %>
<% if fetch(:puma_control_app) %>
activate_control_app "<%= fetch(:puma_default_control_app) %>"
<% end %>
workers <%= puma_workers %>
@@ -32,9 +34,13 @@
puts 'Refreshing Gemfile'
ENV["BUNDLE_GEMFILE"] = "<%= fetch(:bundle_gemfile, "#{current_path}/Gemfile") %>"
end
<% if puma_preload_app? and fetch(:puma_init_active_record) %>
+before_fork do
+ ActiveRecord::Base.connection_pool.disconnect!
+end
+
on_worker_boot do
ActiveSupport.on_load(:active_record) do
ActiveRecord::Base.establish_connection
end
end