(func)
return wrapper
retry connection
retry connection
retry connection
def connection_retry(func):
    """retry connection
    """
    def wrapper(self, *args, **kwargs):
        """wrapper
        """
        res = False
        for ntry in range(60):
            try:
                res = func(self, *args, **kwargs)
                if res is True:
                    break
            except Exception as e:
                LOGGER.error("[rabbitmanager]function %s error" % func.__name__, exc_info=True)
                time.sleep(1)
        return res 
    return wrapper
def connection_retry ( func ) : def wrapper ( self , * args , * * kwargs ) : """wrapper
        """ res = False for ntry in range ( 60 ) : try : res = func ( self , * args , * * kwargs ) if res is True : break except Exception as e : LOGGER . error ( "[rabbitmanager]function %s error" % func . __name__ , exc_info = True ) time . sleep ( 1 ) return res return wrapper