amakawa/redic — pull request #5 by luca3m (2014-07-09 09:40:44+00:00)
Title: HA connection, handling failover with sentinel

Hi,

I wrote a @RedicHA@ client which handles master discovering and failover when possible. Using sentinel as reference.

I tried my best to follow redic philosophy. What do you think about it? These are changes:

1. Raise an exception when a client tries to write on a readonly slave, instead only returning @RuntimeError@
2. Create a RedicHA class that handles this exception and CONNRefused one, asking sentinel again which is the master and reconnecting

thank you!