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

Method kill_worker

gunicorn/dirty/arbiter.py:1003–1009  ·  view source on GitHub ↗

Kill a worker by PID.

(self, pid, sig)

Source from the content-addressed store, hash-verified

1001 os._exit(1)
1002
1003 def kill_worker(self, pid, sig):
1004 """Kill a worker by PID."""
1005 try:
1006 os.kill(pid, sig)
1007 except OSError as e:
1008 if e.errno == errno.ESRCH:
1009 self._cleanup_worker(pid)
1010
1011 def _cleanup_worker(self, pid):
1012 """

Callers 6

handle_manage_requestMethod · 0.95
manage_workersMethod · 0.95
murder_workersMethod · 0.95
reloadMethod · 0.95
stopMethod · 0.95

Calls 1

_cleanup_workerMethod · 0.95

Tested by 1