def exists(self, key):
############################################################################################
# START common safety net for high availability connectivity handling
# This class will automatically retry connections for Redis Instances that are not available
success = False
while not success:
try:
# END common safety net for high availability connectivity handling
############################################################################################
return self.m_redis.exists(key)
############################################################################################
# START common safety net for high availability connectivity handling
success = True
except Exception,R:
# try to reconnect with a throttle
self.retry_throttled_connection(R)
# end try/ex
# end of while not successful
# END common safety net for high availability connectivity handling
############################################################################################
# end of exists
评论列表
文章目录