File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 7676# Params: stdout, stderr, append?
7777stdout_redirect 'log/puma_access.log' , 'log/puma_error.log' , true if %w[ production ] . include? ENV [ 'RAILS_ENV' ]
7878
79- # Before performing a hot restart (not on phased restarts), send another watchdog message
80- # TODO: Consider `on_booted` as well, which currently breaks with Pumactl.
81- on_restart do
79+ # Before performing a hot restart (not on phased restarts) and directly after booting, send another watchdog message
80+ def notify_watchdog
8281 require 'puma/sd_notify'
8382 Puma ::SdNotify . watchdog
8483end
84+ before_restart { notify_watchdog }
85+ after_booted { notify_watchdog }
8586
8687# Note on Phased Restarts:
8788# - Phased Restarts are only supported in cluster mode with multiple workers (i.e., not in development).
8889# - The Puma binary won't be upgraded on phased restarts, but since we have the unattended-upgrades, this is not a major issue.
89- # - See https://github.com/casperisfine /puma/blob/HEAD/docs/restart.md.
90+ # - See https://github.com/puma /puma/blob/HEAD/docs/restart.md.
You can’t perform that action at this time.
0 commit comments