app.py 文件源码

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

项目:onboarding-srv 作者: openpermissions 项目源码 文件源码
def main():
    """
    The entry point for the Onboarding service.
    This will load the configuration files and start a Tornado webservice
    with one or more sub processes.

    NOTES:
    tornado.options.parse_command_line(final=True)
    Allows you to run the service with custom options.

    Examples:
        Change the logging level to debug:
            + python template --logging=DEBUG
            + python template --logging=debug

        Configure custom syslog server:
            + python template --syslog_host=54.77.151.169
    """
    koi.load_config(CONF_DIR)
    app = koi.make_application(
        __version__,
        options.service_type,
        APPLICATION_URLS)
    server = koi.make_server(app)

    # Forks multiple sub-processes, one for each core
    server.start(int(options.processes))

    tornado.ioloop.IOLoop.instance().start()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号