def main(config): conf_logging() app = make_app(config.get('workspace', 'fixtures/workspace'), config.get('auth')) app.listen( int(config.get('port', 8888)), address=config.get('host', '127.0.0.1'), ) log.info('Starting server: {}'.format(_hide_pw(config))) io_loop = IOLoop.current() io_loop.start()
def main(config): conf_logging() app = make_app( cookie_secret=config.get('cookie_secret'), workspace=config.get('workspace', 'fixtures/workspace'), title=config.get('title'), auth=config.get('auth') ) app.listen( int(config.get('port', 8888)), address=config.get('host', '127.0.0.1'), xheaders=True ) log.info('Starting server: {}'.format(_hide_pw(config))) io_loop = IOLoop.current() io_loop.start()
def main(config): lvl = logging.INFO if config.get('debug'): lvl = logging.DEBUG conf_logging(lvl) app = make_app( cookie_secret=config.get('cookie_secret'), workspace=config.get('workspace', 'fixtures/workspace'), title=config.get('title'), auth=config.get('auth'), history_limit=config.get('history_limit'), prefix=config.get('web_path'), ) app.listen(int(config.get('port', 8888)), address=config.get('host', '127.0.0.1'), xheaders=True) log.info('Starting server: {}'.format(_hide_pw(config))) io_loop = IOLoop.current() io_loop.start()
try: module, class_name = plugin_path.rsplit('.', 1) m = importlib.import_module(module) except ImportError: raise PluginError('Could not import plugin {}'.format(plugin_path)) if not hasattr(m, class_name): raise PluginError( 'Could not find class for plugin {}'.format(plugin_path)) return getattr(m, plugin_path) if __name__ == '__main__': conf_logging() if len(sys.argv) != 2: raise PipelineError('Wrong number of arguments') log_file = None if 'LOG_FILE' in os.environ: log_file = os.environ['LOG_FILE'] pipeline_yaml_path = sys.argv[-1] params = {} if log_file: params['log_file'] = log_file pipe = Pipeline.from_yaml(pipeline_yaml_path, params=None)
def _parse_class(plugin_path): try: module, class_name = plugin_path.rsplit('.', 1) m = importlib.import_module(module) except ImportError: raise PluginError('Could not import plugin {}'.format(plugin_path)) if not hasattr(m, class_name): raise PluginError('Could not find class for plugin {}'.format(plugin_path)) return getattr(m, plugin_path) if __name__ == '__main__': conf_logging() if len(sys.argv) != 2: raise PipelineError('Wrong number of arguments') log_file = None if 'LOG_FILE' in os.environ: log_file = os.environ['LOG_FILE'] pipeline_yaml_path = sys.argv[1] if not pipeline_yaml_path or not pipeline_yaml_path.endswith('yaml') or not os.path.exists(pipeline_yaml_path): raise PipelineError('Missing pipeline file') params = {} if log_file: