generic.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:dcos 作者: dcos 项目源码 文件源码
def __setup_httpd_thread(self, socket_path):
        """Setup internal HTTPd server that this endpoints relies on to serve
           requests.

        Args:
            path (str): Unix socket path, that internal httpd server will listen
                on
        """
        self._httpd = UnixSocketStatefulHTTPServer(self._context,
                                                   socket_path,
                                                   self._handler_class)

        httpd_thread_name = "UnixSocketHttpdThread-{}".format(self.id)
        self._httpd_thread = threading.Thread(target=self._httpd.serve_forever,
                                              name=httpd_thread_name)

        # nginx spawns worker processes as 'nobody/nogroup', so we need to
        # make the socket available to it.
        os.chmod(socket_path, 0o777)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号