em-hiredis icon indicating copy to clipboard operation
em-hiredis copied to clipboard

pubsub command

Open adityagodbole opened this issue 10 years ago • 2 comments

The client uses the pubsub method to create and return the pubsub client. This masks the redis PUBSUB command. There are two ways I can think of around this

  1. Change the name of the pubsub method to something like pubsub_client
  2. Pass self to PubsubClient.new in the pubsub method and keep a reference to it in the Pubsubclient object. Forward the call to this Client object in a method called pubsub on the PubsubClient object.

adityagodbole avatar Jan 28 '15 18:01 adityagodbole

Good point; I don't think the command existed when I introduced this API. It's annoying, but I think the correct solution is to rename the pubsub method to pubsub_client as you suggest.

mloughran avatar Jan 28 '15 22:01 mloughran

That would be a breaking change though, and would have to be announced and versioned accordingly

adityagodbole avatar Jan 29 '15 04:01 adityagodbole