#NEWLINE# def post( self , step_id ) : #NEWLINE# #INDENT# jobstep = JobStep . query . get ( step_id ) #NEWLINE# if ( jobstep is None ) : #NEWLINE# #INDENT# return error ( 'Not found' , http_code = 404 ) #NEWLINE# #UNINDENT# if ( jobstep . result == Result . aborted ) : #NEWLINE# #INDENT# return error ( 'Aborted' , http_code = 410 ) #NEWLINE# #UNINDENT# args = self . post_parser . parse_args ( ) #NEWLINE# current_datetime = ( args . date or datetime . utcnow ( ) ) #NEWLINE# jobstep . last_heartbeat = current_datetime #NEWLINE# db . session . add ( jobstep ) #NEWLINE# db . session . commit ( ) #NEWLINE# return self . respond ( jobstep )