#NEWLINE# @ classmethod #NEWLINE# def _error_action( cls , task , status , progress , message = None ) : #NEWLINE# #INDENT# task_name = task . name . title ( ) #NEWLINE# if message : #NEWLINE# #INDENT# message = '{0} has failed. {1}' . format ( task_name , message ) #NEWLINE# notify_message = message . split ( '\n\n' ) [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# error_message = cls . _generate_error_message ( task , error_types = ( 'deploy' , 'provision' ) , names_only = True ) #NEWLINE# message = '{0} has failed. Check these nodes:\n{1}' . format ( cls , error_message ) #NEWLINE# notify_message = ( message if ( error_message is not None ) else None ) #NEWLINE# #UNINDENT# cls . _notify ( task , consts . NOTIFICATION_TOPICS . error , notify_message ) #NEWLINE# data = { #NEWLINE# #INDENT# 'status' : status , #NEWLINE# 'progress' : progress , #NEWLINE# 'message' : message , #NEWLINE# #UNINDENT# } #NEWLINE# objects . Task . update ( task , data )