server.py 文件源码

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

项目:OldSpeak 作者: 0rbitAeolian 项目源码 文件源码
def wsgi(
            self,
            port=None,
            host=None,
            max_accept=settings.GEVENT_MAX_CONNECTIONS,
            min_delay=0.1,
            max_delay=1,
            stop_timeout=1):
        if isinstance(port, int):
            self.port = port

        if isinstance(host, basestring):
            self.host = host

        wsgi_params = dict(
            max_accept=max_accept,
            min_delay=min_delay,
            max_delay=max_delay,
            stop_timeout=stop_timeout,
            get_url=lambda s: self.get_url()
        )
        StandaloneServer = type(
            'StandaloneServer', (WSGIServer, ), wsgi_params)
        return StandaloneServer((self.host, self.port), self)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号