def run(): utils.init_config_and_logging(config.ENGINE_OPTS) redis_connection = utils.make_redis_connection(host=cfg.CONF.redis_host, port=cfg.CONF.redis_port) with rq.Connection(redis_connection): LOG.info('Connected to Redis') queue = rq.Queue(consts.TASK_QUEUE_NAME) rq.Worker(queue).work()
def run(): utils.init_config_and_logging(config.MONITOR_OPTS) redis_connection = utils.make_redis_connection(host=cfg.CONF.redis_host, port=cfg.CONF.redis_port) with rq.Connection(redis_connection): try: while True: show() except KeyboardInterrupt: LOG.info('Shutdown')
def run(): utils.init_config_and_logging(config.ENGINE_OPTS) redis_connection = utils.make_redis_connection(host=cfg.CONF.redis_host, port=cfg.CONF.redis_port) scenario = utils.read_yaml_file( cfg.CONF.scenario, alias_mapper=(lambda f: config.SCENARIOS + '%s.yaml' % f)) with rq.Connection(redis_connection): LOG.info('Connected to Redis') core.process(scenario, cfg.CONF.interval)