rosa-build/config/initializers/redis.rb

11 lines
244 B
Ruby
Raw Normal View History

class Redis
def self.connect!
opts = { url: "redis://localhost:6379/#{::Rails.env.test? ? 1 : 0}" }
opts[:logger] = ::Rails.logger if ::Rails.application.config.log_redis
Redis.current = Redis.new(opts)
end
end
Redis.connect!