The code powering m.abunchtell.com https://m.abunchtell.com
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

15 行
290 B

  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