Chatwoot/config/initializers/redis.rb

10 lines
396 B
Ruby
Raw Normal View History

app_redis_config = {
url: URI.parse(ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379')),
password: ENV.fetch('REDIS_PASSWORD', nil).presence
}
redis = Rails.env.test? ? MockRedis.new : Redis.new(app_redis_config)
# Alfred - Used currently for round robin and conversation emails.
# Add here as you use it for more features
2019-10-20 08:47:26 +00:00
$alfred = Redis::Namespace.new('alfred', redis: redis, warning: true)