Is there way to add some commands to connection prelude?
Closed this issue · 2 comments
Hello,
I'm implementing a cluster client with RedisClient
. The cluster client needs to call the READONLY command at connection prelude if we use the scale reading feature of cluster mode. Is there way to add some commands to the prelude without method overriding?
redis-client/lib/redis_client/config.rb
Lines 95 to 107 in f85e2a8
redis-client/lib/redis_client.rb
Lines 551 to 582 in f85e2a8
Not at the moment, but it could make sense to have a prelude:
parameter for Config
. Feel free to PR that.
But also subclassing Config
may make sense, that's that I do for sentinel. But up to you.
Thank you for your quick reply. I'll try to override with subclassing because this issue is cluster mode matter.