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

Method _start_control_server

gunicorn/arbiter.py:953–977  ·  view source on GitHub ↗

\ Start the control socket server. The server runs in a background thread and accepts commands via Unix socket.

(self)

Source from the content-addressed store, hash-verified

951 return socket_path
952
953 def _start_control_server(self):
954 """\
955 Start the control socket server.
956
957 The server runs in a background thread and accepts commands
958 via Unix socket.
959 """
960 if self.cfg.control_socket_disable:
961 self.log.debug("Control socket disabled")
962 return
963
964 # Lazy import to avoid circular imports and gevent compatibility
965 from gunicorn.ctl.server import ControlSocketServer
966
967 socket_path = self._get_control_socket_path()
968 socket_mode = self.cfg.control_socket_mode
969
970 try:
971 self._control_server = ControlSocketServer(
972 self, socket_path, socket_mode
973 )
974 self._control_server.start()
975 except Exception as e:
976 self.log.warning("Failed to start control socket: %s", e)
977 self._control_server = None
978
979 def _stop_control_server(self):
980 """\

Callers 1

runMethod · 0.95

Calls 5

ControlSocketServerClass · 0.90
debugMethod · 0.45
startMethod · 0.45
warningMethod · 0.45

Tested by

no test coverage detected