Chatwoot/config/initializers/redis.rb
Abhishek 77d380dd6b
chore: refactor redis config (#1310)
- refactor Redis config in Redis::Config Module
-  unit tests for Redis::Config module
2020-10-05 17:31:10 +05:30

10 lines
389 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 = Redis::Namespace.new('alfred', redis: redis, warning: true)
# https://github.com/mperham/sidekiq/issues/4591
# TODO once sidekiq remove we can remove this
Redis.exists_returns_integer = false