#NEWLINE# def purge( self ) : #NEWLINE# #INDENT# for k in self . _transactions . keys ( ) : #NEWLINE# #INDENT# now = time . time ( ) #NEWLINE# transaction = self . _transactions [ k ] #NEWLINE# if ( ( transaction . timestamp + defines . EXCHANGE_LIFETIME ) < now ) : #NEWLINE# #INDENT# logger . debug ( 'Delete transaction' ) #NEWLINE# del self . _transactions [ k ] #NEWLINE# #UNINDENT# #UNINDENT# for k in self . _transactions_token . keys ( ) : #NEWLINE# #INDENT# now = time . time ( ) #NEWLINE# transaction = self . _transactions_token [ k ] #NEWLINE# if ( ( now . timestamp + defines . EXCHANGE_LIFETIME ) < now ) : #NEWLINE# #INDENT# logger . debug ( 'Delete transaction' ) #NEWLINE# del self . _transactions_token [ k ]