示例#1
0
文件: all.py 项目: kjylmr/guts
def main():
    objects.register_all()
    CONF(sys.argv[1:], project='guts',
         version=version.version_string())
    logging.setup(CONF, "guts")
    LOG = logging.getLogger('guts.all')

    utils.monkey_patch()

    gmr.TextGuruMeditation.setup_autorun(version)

    rpc.init(CONF)

    launcher = service.process_launcher()
    # guts-api
    try:
        server = service.WSGIService('osapi_migration')
        launcher.launch_service(server, workers=server.workers or 1)
    except (Exception, SystemExit):
        LOG.exception(_LE('Failed to load osapi_migration'))

    # guts-migration
    try:
        launcher.launch_service(
            service.Service.create(binary='guts-migration'))
    except (Exception, SystemExit):
        LOG.exception(_LE('Failed to load guts-migration'))

    launcher.wait()
示例#2
0
文件: api.py 项目: kjylmr/guts
def main():
    objects.register_all()
    CONF(sys.argv[1:], project='guts', version=version.version_string())
    logging.setup(CONF, "guts")
    utils.monkey_patch()

    rpc.init(CONF)
    launcher = service.process_launcher()
    server = service.WSGIService('osapi_migration')
    launcher.launch_service(server, workers=server.workers)
    launcher.wait()
示例#3
0
文件: api.py 项目: aptira/guts
def main():
    objects.register_all()
    CONF(sys.argv[1:], project="guts", version=version.version_string())
    logging.setup(CONF, "guts")
    utils.monkey_patch()

    rpc.init(CONF)
    launcher = service.process_launcher()
    server = service.WSGIService("osapi_migration")
    launcher.launch_service(server, workers=server.workers)
    launcher.wait()