if (config.getServletConfig().getInitParameter(REDIS_SERVER) != null) {
uri = URI.create(config.getServletConfig().getInitParameter(REDIS_SERVER));
}
}
jedisSubscriber = new Jedis(uri.getHost(), uri.getPort());
try {
jedisSubscriber.connect();
} catch (IOException e) {
logger.error("failed to connect subscriber", e);
}
jedisSubscriber.auth(authToken);
jedisSubscriber.flushAll();
jedisPublisher = new Jedis(uri.getHost(), uri.getPort());
try {
jedisPublisher.connect();
} catch (IOException e) {
logger.error("failed to connect publisher", e);
}