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

Method shutdown

gunicorn/ctl/handlers.py:440–455  ·  view source on GitHub ↗

Initiate shutdown. Args: mode: "graceful" (SIGTERM) or "quick" (SIGINT) Returns: Dictionary with status

(self, mode: str = "graceful")

Source from the content-addressed store, hash-verified

438 return {"status": "reopening"}
439
440 def shutdown(self, mode: str = "graceful") -> dict:
441 """
442 Initiate shutdown.
443
444 Args:
445 mode: "graceful" (SIGTERM) or "quick" (SIGINT)
446
447 Returns:
448 Dictionary with status
449 """
450 if mode == "quick":
451 os.kill(self.arbiter.pid, signal.SIGINT)
452 else:
453 os.kill(self.arbiter.pid, signal.SIGTERM)
454
455 return {"status": "shutting_down", "mode": mode}
456
457 def show_all(self) -> dict:
458 """

Callers 15

test_shutdown_quickMethod · 0.95
close_gracefulFunction · 0.45
_cleanupMethod · 0.45
_shutdownMethod · 0.45
handle_quitMethod · 0.45
runMethod · 0.45
handle_requestMethod · 0.45
_execute_commandMethod · 0.45

Calls

no outgoing calls