#NEWLINE# def get_progress( self , full_node_list = None ) : #NEWLINE# #INDENT# if ( self . status in ( 'SUCCEEDED' , 'KILLED' , 'FAILED' ) ) : #NEWLINE# #INDENT# return 100 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( full_node_list is not None ) : #NEWLINE# #INDENT# total_actions = ( len ( full_node_list ) - 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# total_actions = len ( self . actions ) #NEWLINE# #UNINDENT# return int ( ( ( sum ( [ action . is_finished ( ) for action in full_node_list . actions ] ) / float ( max ( total_actions , 1 ) ) ) * 100 ) )