etaty / rediscala

Non-blocking, Reactive Redis driver for Scala (with Sentinel support)
Apache License 2.0
790 stars 142 forks source link

feature/redis-empty-slaves #74

Closed alexanderscott closed 9 years ago

alexanderscott commented 9 years ago

Certain environments may have slaves configured (i.e. production) while others may not (i.e. development). Because RedisClientMasterSlaves and RedisClient do not share a type, it's easier to just configure variable redis to always be of type RedisClientMasterSlaves and have commands directed appropriately. This will not currently work, however, if there happen to be no slaves configured for the environment in question. Catching the empty condition should direct reads as well as writes to master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.08%) to 91.95% when pulling 617110209b9a08c0df371867adb73e7eb71e1d68 on alexanderscott:feature/redis-empty-slaves into 37775a34f6b80782fa240402f00efcdc41231ceb on etaty:master.