redis_wrapper.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:sci-pype 作者: jay-johnson 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号