Skip to content

Commit

Permalink
Use JedisPool in place of generic connection pool (#711)
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
pditommaso authored Oct 22, 2024
1 parent c3be930 commit cd16cfd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/groovy/io/seqera/wave/redis/RedisFactory.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@

package io.seqera.wave.redis


import groovy.transform.CompileStatic
import groovy.util.logging.Slf4j
import io.micronaut.context.annotation.Factory
import io.micronaut.context.annotation.Requires
import io.micronaut.context.annotation.Value
import jakarta.inject.Singleton
import org.apache.commons.pool2.impl.GenericObjectPoolConfig
import redis.clients.jedis.JedisPool

import redis.clients.jedis.JedisPoolConfig
/**
* Redis connection pool factory
*
Expand All @@ -47,7 +45,7 @@ class RedisFactory {
@Value('${redis.pool.maxTotal:50}') int maxTotal
) {
log.info "Using redis $uri as storage for rate limit - pool minIdle: ${minIdle}; maxIdle: ${maxIdle}; maxTotal: ${maxTotal}"
final config = new GenericObjectPoolConfig()
final config = new JedisPoolConfig()
config.setMinIdle(minIdle)
config.setMaxIdle(maxIdle)
config.setMaxTotal(maxTotal)
Expand Down

0 comments on commit cd16cfd

Please sign in to comment.