Skip to content

Commit

Permalink
Merge pull request #95 from ttomsu/google-debug-tweaks
Browse files Browse the repository at this point in the history
Adds EmbeddedRedis prototype bean annotation in an attempt to combat …
  • Loading branch information
Travis Tomsu committed Oct 4, 2016
2 parents 3d17975 + ce0704d commit df5c69f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ package com.netflix.spinnaker.config

import com.netflix.spinnaker.fiat.redis.JedisSource
import com.netflix.spinnaker.kork.jedis.EmbeddedRedis
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Scope
import redis.clients.jedis.Jedis
import redis.clients.util.Pool

@Configuration
class EmbeddedRedisConfig {

@Bean
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
EmbeddedRedis redisServer() {
def redis = EmbeddedRedis.embed()
redis.jedis.withCloseable { Jedis jedis ->
Expand All @@ -47,4 +50,4 @@ class EmbeddedRedisConfig {
jedisPool().getResource()
}
}
}
}

0 comments on commit df5c69f

Please sign in to comment.