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.
Coverage increased (+0.08%) to 91.95% when pulling 617110209b9a08c0df371867adb73e7eb71e1d68 on alexanderscott:feature/redis-empty-slaves into 37775a34f6b80782fa240402f00efcdc41231ceb on etaty:master.
Certain environments may have slaves configured (i.e. production) while others may not (i.e. development). Because
RedisClientMasterSlaves
andRedisClient
do not share a type, it's easier to just configure variableredis
to always be of typeRedisClientMasterSlaves
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.