Skip to content

Commit ff883b4

Browse files
committed
systemd: send STOPPING=1 on shutdown
1 parent 4171311 commit ff883b4

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
@@ -348,6 +348,8 @@ def wakeup(self):
348348

349349
def halt(self, reason=None, exit_status=0):
350350
""" halt arbiter """
351+
systemd.sd_notify("STOPPING=1\nSTATUS=Gunicorn shutting down..\n", self.log)
352+
351353
self.stop()
352354

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

0 commit comments

Comments
 (0)