Skip to content

Commit eb1bc82

Browse files
committed
Migrate Puma config to v7
1 parent 21e5f5a commit eb1bc82

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

config/puma.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,15 @@
7272
# Disable automatic tagging of the service.
7373
tag ''
7474

75-
# Before performing a hot restart (not on phased restarts), send another watchdog message
76-
# TODO: Consider `on_booted` as well, which currently breaks with Pumactl.
77-
on_restart do
75+
# Before performing a hot restart (not on phased restarts) and directly after booting, send another watchdog message
76+
def notify_watchdog
7877
require 'puma/sd_notify'
7978
Puma::SdNotify.watchdog
8079
end
80+
before_restart { notify_watchdog }
81+
after_booted { notify_watchdog }
8182

8283
# Note on Phased Restarts:
8384
# - Phased Restarts are only supported in cluster mode with multiple workers (i.e., not in development).
8485
# - The Puma binary won't be upgraded on phased restarts, but since we have the unattended-upgrades, this is not a major issue.
85-
# - See https://github.com/casperisfine/puma/blob/HEAD/docs/restart.md.
86+
# - See https://github.com/puma/puma/blob/HEAD/docs/restart.md.

0 commit comments

Comments
 (0)