MCPcopy
hub / github.com/benoitc/gunicorn / handle_exit

Method handle_exit

gunicorn/workers/gthread.py:249–254  ·  view source on GitHub ↗

Handle SIGTERM - begin graceful shutdown.

(self, sig, frame)

Source from the content-addressed store, hash-verified

247 return futures.ThreadPoolExecutor(max_workers=self.cfg.threads)
248
249 def handle_exit(self, sig, frame):
250 """Handle SIGTERM - begin graceful shutdown."""
251 if self.alive:
252 self.alive = False
253 # Wake up the poller so it can start shutdown
254 self.method_queue.defer(lambda: None)
255
256 def handle_quit(self, sig, frame):
257 """Handle SIGQUIT - immediate shutdown."""

Callers

nothing calls this directly

Calls 1

deferMethod · 0.80

Tested by

no test coverage detected