Exemplo n.º 1
0
def main():
    config.init(app.common_opts, sys.argv[1:])
    application = app.setup_app()

    host = CONF.bind_host
    port = CONF.bind_port
    workers = CONF.api_workers

    if workers < 1:
        LOG.warning("Wrong worker number, worker = %(workers)s", workers)
        workers = 1

    LOG.info("Admin API on http://%(host)s:%(port)s with %(workers)s", {
        'host': host,
        'port': port,
        'workers': workers
    })

    service = wsgi.Server(CONF, 'Tricircle Admin_API', application, host, port)
    restapp.serve(service, CONF, workers)

    LOG.info("Configuration:")
    CONF.log_opt_values(LOG, logging.INFO)

    restapp.wait()
Exemplo n.º 2
0
def init_application():

    # initialize the config system
    conf_file = _get_config_file()
    config.init(app.common_opts, ['--config-file', conf_file])

    LOG.info("Configuration:")
    CONF.log_opt_values(LOG, logging.INFO)

    # return WSGI app
    return app.setup_app()
Exemplo n.º 3
0
def init_application():

    # initialize the config system
    conf_file = _get_config_file()
    config.init(app.common_opts, ['--config-file', conf_file])

    LOG.info("Configuration:")
    CONF.log_opt_values(LOG, logging.INFO)

    # return WSGI app
    return app.setup_app()
Exemplo n.º 4
0
def main():
    config.init(xservice.common_opts, sys.argv[1:])

    host = CONF.host
    workers = CONF.workers

    if workers < 1:
        LOG.warning(_LW("Wrong worker number, worker = %(workers)s"), workers)
        workers = 1

    LOG.info(_LI("XJob Server on http://%(host)s with %(workers)s"),
             {'host': host, 'workers': workers})

    xservice.serve(xservice.create_service(), workers)

    LOG.info(_LI("Configuration:"))
    CONF.log_opt_values(LOG, std_logging.INFO)

    xservice.wait()
Exemplo n.º 5
0
def main():
    config.init(xservice.common_opts, sys.argv[1:])

    host = CONF.host
    workers = CONF.workers

    if workers < 1:
        LOG.warning("Wrong worker number, worker = %(workers)s", workers)
        workers = 1

    LOG.info("XJob Server on http://%(host)s with %(workers)s",
             {'host': host, 'workers': workers})

    xservice.serve(xservice.create_service(), workers)

    LOG.info("Configuration:")
    CONF.log_opt_values(LOG, logging.INFO)

    xservice.wait()
Exemplo n.º 6
0
def main():
    config.init(app.common_opts, sys.argv[1:])
    application = app.setup_app()

    host = CONF.bind_host
    port = CONF.bind_port
    workers = CONF.api_workers

    if workers < 1:
        LOG.warning(_LW("Wrong worker number, worker = %(workers)s"), workers)
        workers = 1

    LOG.info(_LI("Admin API on http://%(host)s:%(port)s with %(workers)s"),
             {'host': host, 'port': port, 'workers': workers})

    service = wsgi.Server(CONF, 'Tricircle Admin_API', application, host, port)
    restapp.serve(service, CONF, workers)

    LOG.info(_LI("Configuration:"))
    CONF.log_opt_values(LOG, std_logging.INFO)

    restapp.wait()
Exemplo n.º 7
0
def main():
    config.init(sys.argv[1:])
    config.setup_logging()
    application = app.setup_app()

    host = CONF.bind_host
    port = CONF.bind_port
    workers = CONF.api_workers

    if workers < 1:
        LOG.warning(_LW("Wrong worker number, worker = %(workers)s"), workers)
        workers = 1

    LOG.info(_LI("Server on http://%(host)s:%(port)s with %(workers)s"),
             {'host': host, 'port': port, 'workers': workers})

    serving.run_simple(host, port,
                       application,
                       processes=workers)

    LOG.info(_LI("Configuration:"))
    CONF.log_opt_values(LOG, std_logging.INFO)
Exemplo n.º 8
0
def main():
    config.init(sys.argv[1:])
    config.setup_logging()
    application = app.setup_app()

    host = CONF.bind_host
    port = CONF.bind_port
    workers = CONF.api_workers

    if workers < 1:
        LOG.warning(_LW("Wrong worker number, worker = %(workers)s"), workers)
        workers = 1

    LOG.info(_LI("Server on http://%(host)s:%(port)s with %(workers)s"), {
        'host': host,
        'port': port,
        'workers': workers
    })

    serving.run_simple(host, port, application, processes=workers)

    LOG.info(_LI("Configuration:"))
    CONF.log_opt_values(LOG, std_logging.INFO)