f2753df8df
- The initializer set up a connection pool, but both pools created namespace wrappers around a single global connection. Splitting them up.
14 lines
568 B
Ruby
14 lines
568 B
Ruby
# Alfred
|
|
# Add here as you use it for more features
|
|
# Used for Round Robin, Conversation Emails & Online Presence
|
|
$alfred = ConnectionPool::Wrapper.new(size: 5, timeout: 3) do
|
|
redis = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
|
|
Redis::Namespace.new('alfred', redis: redis, warning: true)
|
|
end
|
|
|
|
# Velma : Determined protector
|
|
# used in rack attack
|
|
$velma = ConnectionPool::Wrapper.new(size: 5, timeout: 3) do
|
|
redis = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
|
|
Redis::Namespace.new('velma', redis: redis, warning: true)
|
|
end
|