Module: RedisLocks::Connections
- Defined in:
- lib/redis_locks/connections.rb
Class Method Summary collapse
Class Method Details
.ensure_pool(redis) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/redis_locks/connections.rb', line 6 def self.ensure_pool(redis) if redis.respond_to?(:with) redis else ConnectionPool.new { redis.dup } end end |