Changing Ping health probe to call Redis Cache Ping method

This commit is contained in:
Simon Zeltser 2018-09-20 23:43:06 -07:00
parent ff66de0a91
commit 46dcc3d6c7

View file

@ -202,8 +202,10 @@ namespace cartservice.cartstore
{ {
try try
{ {
EnsureRedisConnected(); var redis = ConnectionMultiplexer.Connect(redisConnectionOptions);
return true; var cache = redis.GetDatabase();
var res = cache.Ping();
return res != TimeSpan.Zero;
} }
catch (Exception) catch (Exception)
{ {