flyerhzm / redis-sentinel

another redis automatic master/slave failover solution for ruby by using built-in redis sentinel (deprecated)
MIT License
188 stars 67 forks source link

Reconnect Sentinel clients when calling reconnect #12

Closed nick-desteffen closed 11 years ago

nick-desteffen commented 11 years ago

Gems that fork processes require you to reconnect redis clients after they fork a process. Resque and Passenger are 2 of these gems. This pull patches the reconnect method to also call reconnect on each of the sentinel Redis clients.

Without reconnecting the Sentinel Redis clients you'll get Redis::InheritedError exceptions.