def main(): try: config.parse_args() config.set_config_defaults() wsgi.set_eventlet_hub() logging.setup(CONF, 'searchlight') utils.register_plugin_opts() # Fail fast if service policy files aren't found service_policies.check_policy_files() if CONF.profiler.enabled: _notifier = osprofiler.notifier.create("Messaging", notifier.messaging, {}, notifier.get_transport(), "searchlight", "search", CONF.api.bind_host) osprofiler.notifier.set(_notifier) else: osprofiler.web.disable() server = wsgi.Server(workers=CONF.api.workers) server.start(config.load_paste_app('searchlight'), default_port=9393) server.wait() except KNOWN_EXCEPTIONS as e: fail(e)
def main(): try: configure_wsgi() wsgi.set_eventlet_hub() server = wsgi.Server(workers=CONF.api.workers) server.start(config.load_paste_app('searchlight'), default_port=9393) server.wait() except KNOWN_EXCEPTIONS as e: fail(e)
def main(): try: config.parse_args() wsgi.set_eventlet_hub() logging.setup(CONF, 'searchlight') if cfg.CONF.profiler.enabled: _notifier = osprofiler.notifier.create("Messaging", notifier.messaging, {}, notifier.get_transport(), "searchlight", "search", cfg.CONF.bind_host) osprofiler.notifier.set(_notifier) else: osprofiler.web.disable() server = wsgi.Server() server.start(config.load_paste_app('searchlight'), default_port=9393) server.wait() except KNOWN_EXCEPTIONS as e: fail(e)