#NEWLINE# def retry_call( self , key , f , time_expire , with_locking ) : #NEWLINE# #INDENT# self . RETRIES += 1 #NEWLINE# if ( self . RETRIES <= time_expire . MAX_RETRIES ) : #NEWLINE# #INDENT# logger . error ( ( 'sleeping %s seconds before reconnecting' % ( 2 * self . RETRIES ) ) ) #NEWLINE# time . sleep ( ( 2 * self . RETRIES ) ) #NEWLINE# self . __init__ ( self . server , self . db , self . debug , self . with_lock ) #NEWLINE# return self . __call__ ( key , f , time_expire , with_locking ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . RETRIES = 0 #NEWLINE# raise ConnectionError ( ( 'Redis instance is unavailable at %s' % self . server ) )