def main(): # the configuration will be read into the cfg.CONF global data structure config.init(sys.argv[1:]) if not cfg.CONF.config_file: sys.exit(_("ERROR: Unable to find configuration file via the default" " search paths (~/.tacker/, ~/, /etc/tacker/, /etc/) and" " the '--config-file' option!")) try: tacker_api = service.serve_wsgi(service.TackerApiService) launcher = common_service.launch(tacker_api, workers=cfg.CONF.api_workers) launcher.wait() except KeyboardInterrupt: pass except RuntimeError as e: sys.exit(_("ERROR: %s") % e)
def main(): # the configuration will be read into the cfg.CONF global data structure config.init(sys.argv[1:]) if not cfg.CONF.config_file: sys.exit( _("ERROR: Unable to find configuration file via the default" " search paths (~/.tacker/, ~/, /etc/tacker/, /etc/) and" " the '--config-file' option!")) try: tacker_api = service.serve_wsgi(service.TackerApiService) launcher = common_service.launch(tacker_api, workers=cfg.CONF.api_workers) launcher.wait() except KeyboardInterrupt: pass except RuntimeError as e: sys.exit(_("ERROR: %s") % e)