Ejemplo n.º 1
0
def main():

    config.setup_logging(CONF)
    config.init(sys.argv)

    process_launcher = service.ProcessLauncher(CONF)
    process_launcher.launch_service(
        engine.Service(threads=CONF['service:engine'].threads),
        workers=CONF['service:engine'].workers
    )
    process_launcher.launch_service(
        conductor.Service(threads=CONF['service:conductor'].threads),
        workers=CONF['service:conductor'].workers)

    process_launcher.launch_service(
        api.Service(
            CONF,
            'API',
            Loader(CONF).load_app('kosmos'),
            host=CONF['service:api'].bind_host,
            port=CONF['service:api'].bind_port
        ),

        workers=CONF['service:api'].workers)

    process_launcher.wait()
Ejemplo n.º 2
0
def main():

    config.setup_logging(CONF)
    config.init(sys.argv)

    process_launcher = service.ProcessLauncher(CONF)
    process_launcher.launch_service(
        conductor.Service(threads=CONF['service:conductor'].threads),
        workers=CONF['service:conductor'].workers)

    process_launcher.wait()
Ejemplo n.º 3
0
def main():

    config.setup_logging(CONF)
    config.init(sys.argv)

    process_launcher = service.ProcessLauncher(CONF)
    process_launcher.launch_service(
        api.Service(
            CONF,
            'API',
            Loader(CONF).load_app('kosmos'),
            host=CONF['service:api'].bind_host,
            port=CONF['service:api'].bind_port
        ),

        workers=CONF['service:api'].workers)

    process_launcher.wait()
Ejemplo n.º 4
0
 def test_sanity(self):
     config.init([])
     config.setup_logging(cfg.CONF)
     # Resetting because this will cause inconsistent errors when run with
     # other tests
     self.addCleanup(cfg.CONF.reset)
Ejemplo n.º 5
0
 def test_sanity(self):
     config.init([])
     config.setup_logging(cfg.CONF)
     # Resetting because this will cause inconsistent errors when run with
     # other tests
     self.addCleanup(cfg.CONF.reset)
Ejemplo n.º 6
0
def prepare_service(argv=None):
    """Sets global config from config file and sets up logging."""
    argv = argv or []
    config.init(argv[1:])
    log.set_defaults()
    config.setup_logging(cfg.CONF)