예제 #1
0
def main():
    config.parse_args()
    # TODO(agalkin): Implement DB drop support
    # try:
    #     db_api.drop_db()
    # except:
    #     pass
    db_api.setup_db()
예제 #2
0
파일: engine.py 프로젝트: Mirantis/celebrer
def main():
    try:
        config.parse_args()
        logging.setup(CONF, 'celebrer')
        launcher = service.ServiceLauncher(CONF)
        for rpc_service in engine.get_rpc_service():
            launcher.launch_service(rpc_service)
        launcher.wait()
    except RuntimeError as e:
        sys.stderr.write("ERROR: %s\n" % e)
        sys.exit(1)
예제 #3
0
파일: api.py 프로젝트: Mirantis/celebrer
def main():
    try:
        config.parse_args()

        logging.setup(CONF, 'celebrer')
        launcher = service.ServiceLauncher(CONF)

        app = app_loader.load_paste_app('celebrer')
        port, host = (CONF.bind_port, CONF.bind_host)

        launcher.launch_service(wsgi.Service(app, port, host))

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