#NEWLINE# def __exit__( self , exc_type , exc_value , exc_traceback ) : #NEWLINE# #INDENT# self . finish = time . time ( ) #NEWLINE# self . is_done . set ( ) #NEWLINE# self . aborting_checker . join ( ) #NEWLINE# self . thread . join ( ) #NEWLINE# if exc_type : #NEWLINE# #INDENT# self . sla_checker . set_unexpected_failure ( exc_value ) #NEWLINE# #UNINDENT# if ( objects . Task . get_status ( self . task [ 'uuid' ] ) == consts . TaskStatus . ABORTED ) : #NEWLINE# #INDENT# self . sla_checker . set_aborted_manually ( ) #NEWLINE# #UNINDENT# self . results . sort ( key = ( lambda x : x [ 'timestamp' ] ) ) #NEWLINE# LOG . info ( ( 'Load duration is: %s' % ( self . load_finished_at - self . load_started_at ) ) ) #NEWLINE# LOG . info ( ( 'Full runner duration is: %s' % self . runner . run_duration ) ) #NEWLINE# LOG . info ( ( 'Full duration is %s' % ( exc_value . finish - self . start ) ) ) #NEWLINE# self . task . append_results ( self . key , { #NEWLINE# #INDENT# 'raw' : self . results , #NEWLINE# 'load_duration' : ( self . load_finished_at - self . load_started_at ) , #NEWLINE# 'full_duration' : ( self . finish - self . start ) , #NEWLINE# 'sla' : self . sla_checker . results ( ) , #NEWLINE# #UNINDENT# } )