\ Start the control socket server. The server runs in a background thread and accepts commands via Unix socket.
(self)
| 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 | """\ |
no test coverage detected