# you need to make sure to reconnect any threads in the `on_worker_boot`
# block.
#
-# preload_app!
+preload_app!
# The code in the `on_worker_boot` will be called if you are using
# clustered mode by specifying a number of `workers`. After each worker
# or connections that may have been created at application boot, Ruby
# cannot share connections between processes.
#
-# on_worker_boot do
-# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
-# end
+on_worker_boot do
+ ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
+end
# Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart