@@ -27,7 +27,8 @@ def initialize(
2727 replica : false ,
2828 replica_affinity : :random ,
2929 fixed_hostname : '' ,
30- client_implementation : Cluster ,
30+ concurrent_worker_model : nil ,
31+ client_implementation : ::RedisClient ::Cluster , # for redis gem
3132 **client_config
3233 )
3334
@@ -38,6 +39,7 @@ def initialize(
3839 client_config = client_config . reject { |k , _ | IGNORE_GENERIC_CONFIG_KEYS . include? ( k ) }
3940 @command_builder = client_config . fetch ( :command_builder , ::RedisClient ::CommandBuilder )
4041 @client_config = merge_generic_config ( client_config , @node_configs )
42+ @concurrent_worker_model = concurrent_worker_model
4143 @client_implementation = client_implementation
4244 @mutex = Mutex . new
4345 end
@@ -48,6 +50,7 @@ def dup
4850 replica : @replica ,
4951 replica_affinity : @replica_affinity ,
5052 fixed_hostname : @fixed_hostname ,
53+ concurrent_worker_model : @concurrent_worker_model ,
5154 client_implementation : @client_implementation ,
5255 **@client_config
5356 )
@@ -62,11 +65,16 @@ def read_timeout
6265 end
6366
6467 def new_pool ( size : 5 , timeout : 5 , **kwargs )
65- @client_implementation . new ( self , pool : { size : size , timeout : timeout } , **kwargs )
68+ @client_implementation . new (
69+ self ,
70+ pool : { size : size , timeout : timeout } ,
71+ concurrent_worker_model : @concurrent_worker_model ,
72+ **kwargs
73+ )
6674 end
6775
6876 def new_client ( **kwargs )
69- @client_implementation . new ( self , **kwargs )
77+ @client_implementation . new ( self , concurrent_worker_model : @concurrent_worker_model , **kwargs )
7078 end
7179
7280 def per_node_key
0 commit comments