Skip to content

Commit

Permalink
Merge pull request #8434 from SuperTux88/fix-pumactl-restart
Browse files Browse the repository at this point in the history
Silence warning about unused callbacks to fix pumactl restart
  • Loading branch information
SuperTux88 committed Jun 29, 2023
2 parents 4919890 + 994f003 commit 8d38193
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@

preload_app!

# Below callbacks (before_fork and on_worker_boot) are only used when running
# in cluster mode. Since we're not running in cluster mode by default (see
# workers above), a warning is written on startup about them not being called
# in single mode. So lets just silence that warnings, but still keep the
# callbacks in place in case somebody switches on the cluster mode.
silence_fork_callback_warning

before_fork do
# we're preloading app in production, so force-reconenct the DB
ActiveRecord::Base.connection_pool.disconnect!
Expand Down

0 comments on commit 8d38193

Please sign in to comment.