From bd35b4ad21ec5169ebc3218891847ad9b247a040 Mon Sep 17 00:00:00 2001 From: Larry Guger Date: Wed, 11 May 2016 12:04:54 -0700 Subject: [PATCH] Add support for password on a redis connection (#91) --- .../spinnaker/rosco/persistence/config/JedisConfig.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/persistence/config/JedisConfig.groovy b/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/persistence/config/JedisConfig.groovy index 102039c2a..2fa9ed365 100644 --- a/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/persistence/config/JedisConfig.groovy +++ b/rosco-core/src/main/groovy/com/netflix/spinnaker/rosco/persistence/config/JedisConfig.groovy @@ -29,13 +29,14 @@ import redis.clients.jedis.JedisPool class JedisConfig { @Bean - JedisPool jedisPool(@Value('${redis.connection:redis://localhost:6379}') String connection) { + JedisPool jedisPool(@Value('${redis.connection:redis://localhost:6379}') String connection, + @Value('${redis.timeout:2000}') int timeout) { RedisConnectionInfo connectionInfo = RedisConnectionInfo.parseConnectionUri(connection) GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig() poolConfig.setMaxTotal(100) poolConfig.setMinIdle(25) poolConfig.setMaxIdle(100) - new JedisPool(poolConfig, connectionInfo.host, connectionInfo.port) + new JedisPool(poolConfig, connectionInfo.host, connectionInfo.port, timeout, connectionInfo.password) } @Bean