logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

redis.rb (290B)


  1. # frozen_string_literal: true
  2. redis_connection = Redis.new(
  3. url: ENV['REDIS_URL'],
  4. driver: :hiredis
  5. )
  6. namespace = ENV.fetch('REDIS_NAMESPACE') { nil }
  7. if namespace
  8. Redis.current = Redis::Namespace.new(namespace, redis: redis_connection)
  9. else
  10. Redis.current = redis_connection
  11. end