Chatwoot/config/initializers/01_redis.rb
2021-10-11 19:46:15 +05:30

10 lines
485 B
Ruby

redis = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
# 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) { Redis::Namespace.new('alfred', redis: redis, warning: true) }
# Velma : Determined protector
# used in rack attack
$velma = ConnectionPool::Wrapper.new(size: 5, timeout: 3) { Redis::Namespace.new('velma', redis: redis, warning: true) }