コード例 #1
0
def main():
    try:
        config.parse_args()
        log.setup('muranoapi')

        launcher = service.ServiceLauncher()
        launcher.launch_service(engine.get_rpc_service())

        launcher.wait()
    except RuntimeError, e:
        sys.stderr.write("ERROR: %s\n" % e)
        sys.exit(1)
コード例 #2
0
ファイル: api.py プロジェクト: TimurNurlygayanov/murano-api
def main():
    try:
        config.parse_args()
        log.setup('muranoapi')
        request_statistics.init_stats()

        launcher = service.ServiceLauncher()

        app = config.load_paste_app('muranoapi')
        port, host = (config.CONF.bind_port, config.CONF.bind_host)

        launcher.launch_service(wsgi.Service(app, port, host))
        launcher.launch_service(server.get_rpc_service())
        launcher.launch_service(server.get_notification_service())
        launcher.launch_service(stats.StatsCollectingService())

        launcher.wait()
    except RuntimeError, e:
        sys.stderr.write("ERROR: %s\n" % e)
        sys.exit(1)