#NEWLINE# def delete_expired_oswl_entries( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# deleted_rows_count = objects . OpenStackWorkloadStatsCollection . clean_expired_entries ( ) #NEWLINE# if ( deleted_rows_count == 0 ) : #NEWLINE# #INDENT# logger . info ( 'There are no expired OSWL entries in db.' ) #NEWLINE# #UNINDENT# db ( ) . commit ( ) #NEWLINE# logger . info ( 'Expired OSWL entries are successfully cleaned from db' ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# logger . exception ( 'Exception while cleaning oswls entries from db. Details: {0}' . format ( six . text_type ( e ) ) ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# db . remove ( )