提交 a4f96c33 编写于 作者: P Pratik Naik

Redis config with indifferent access

上级 6d31f64c
......@@ -5,7 +5,7 @@ class Server
attr_accessor :registered_channels, :redis_config
def initialize(redis_config:, channels:, worker_pool_size: 100, connection: Connection)
@redis_config = redis_config
@redis_config = redis_config.with_indifferent_access
@registered_channels = Set.new(channels)
@worker_pool_size = worker_pool_size
@connection_class = connection
......@@ -22,7 +22,7 @@ def worker_pool
end
def pubsub
@pubsub ||= EM::Hiredis.connect(@redis_config['url']).pubsub
@pubsub ||= EM::Hiredis.connect(@redis_config[:url]).pubsub
end
def remote_connections
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册