Restructure omni services and add Chatwoot research snapshot
This commit is contained in:
20
research/chatwoot/config/initializers/01_redis.rb
Normal file
20
research/chatwoot/config/initializers/01_redis.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
# TODO: Phase out the custom ConnectionPool wrappers ($alfred / $velma),
|
||||
# switch to plain Redis clients here and let Rails 7.1+ handle pooling
|
||||
# via `pool:` in RedisCacheStore (see rack_attack initializer).
|
||||
|
||||
# Alfred
|
||||
# Add here as you use it for more features
|
||||
# Used for Round Robin, Conversation Emails & Online Presence
|
||||
alfred_size = ENV.fetch('REDIS_ALFRED_SIZE', 5)
|
||||
$alfred = ConnectionPool.new(size: alfred_size, timeout: 1) 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_size = ENV.fetch('REDIS_VELMA_SIZE', 10)
|
||||
$velma = ConnectionPool.new(size: velma_size, timeout: 1) do
|
||||
config = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
|
||||
Redis::Namespace.new('velma', redis: config, warning: true)
|
||||
end
|
||||
Reference in New Issue
Block a user