mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 15:21:24 +08:00
added basic passenger support, no long polling but functions
clean up initializers so they are ordered properly
This commit is contained in:
@ -35,6 +35,13 @@ class DiscourseRedis
|
||||
RailsMultisite::ConnectionManagement.current_db
|
||||
end
|
||||
|
||||
def self.new_redis_store
|
||||
redis_config = YAML::load(File.open("#{Rails.root}/config/redis.yml"))[Rails.env]
|
||||
redis_store = ActiveSupport::Cache::RedisStore.new "redis://#{redis_config['host']}:#{redis_config['port']}/#{redis_config['cache_db']}"
|
||||
redis_store.options[:namespace] = -> { DiscourseRedis.namespace }
|
||||
redis_store
|
||||
end
|
||||
|
||||
def url
|
||||
"redis://#{@config['host']}:#{@config['port']}/#{@config['db']}"
|
||||
end
|
||||
|
Reference in New Issue
Block a user