Example #1
0
File: all.py Project: 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()
Example #2
0
File: api.py Project: 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()
Example #3
0
File: api.py Project: 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()