#NEWLINE# def process_run_result( self , result , context ) : #NEWLINE# #INDENT# num_iterations = sum ( context . job_iteration_counts . values ( ) ) #NEWLINE# counter = collections . Counter ( ) #NEWLINE# for result in result . iteration_results : #NEWLINE# #INDENT# counter [ result . status ] += 1 #NEWLINE# #UNINDENT# score_board = [ ] #NEWLINE# for status in IterationResult . values : #NEWLINE# #INDENT# if ( status in counter ) : #NEWLINE# #INDENT# score_board . append ( '{} {}' . format ( counter [ status ] , status ) ) #NEWLINE# #UNINDENT# #UNINDENT# summary = 'Workload Automation run finised' #NEWLINE# body = 'Ran a total of {} iterations: ' . format ( num_iterations ) #NEWLINE# body += ', ' . join ( status ) #NEWLINE# notification = notify2 . Notification ( summary , body ) #NEWLINE# if ( not notification . show ( ) ) : #NEWLINE# #INDENT# self . logger . warning ( 'Notification failed to show' )