Skip to content

Commit 7d49300

Browse files
committed
systemd: send STOPPING=1 on shutdown
1 parent 02582c6 commit 7d49300

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gunicorn/arbiter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ def wakeup(self):
350350

351351
def halt(self, reason=None, exit_status=0):
352352
""" halt arbiter """
353+
systemd.sd_notify("STOPPING=1\nSTATUS=Gunicorn shutting down..", self.log)
354+
353355
self.stop()
354356

355357
log_func = self.log.info if exit_status == 0 else self.log.error

0 commit comments

Comments
 (0)