gevent_service.py 文件源码

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

项目:linkero 作者: ingran 项目源码 文件源码
def run(app):
    linkero.printWellcome()
    linkero.createDB()
    if linkero.config["SSL"]["activate"]:
        gevent_server = WSGIServer((linkero.config["host"]["ip"],
                                    int(os.environ.get('PORT', linkero.config["host"]["port"]))),
                                    app, spawn=Pool(linkero.config["gevent"]["spawn"]),
                                    log='default' if (linkero.config["gevent"]["accessLog"] == True) else None,
                                    keyfile=linkero.config["SSL"]["key"], certfile=linkero.config["SSL"]["certificate"])
    else:
        gevent_server = WSGIServer((linkero.config["host"]["ip"],
                                    int(os.environ.get('PORT', linkero.config["host"]["port"]))),
                                    app, spawn=Pool(linkero.config["gevent"]["spawn"],
                                    log = 'default' if (linkero.config["gevent"]["accessLog"] == True) else None))
    gevent_server.serve_forever()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号