Skip to content

Commit

Permalink
systemd: send STOPPING=1 on shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
pajod committed Sep 8, 2024
1 parent 4171311 commit ff883b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gunicorn/arbiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ def wakeup(self):

def halt(self, reason=None, exit_status=0):
""" halt arbiter """
systemd.sd_notify("STOPPING=1\nSTATUS=Gunicorn shutting down..\n", self.log)

self.stop()

log_func = self.log.info if exit_status == 0 else self.log.error
Expand Down

0 comments on commit ff883b4

Please sign in to comment.