#NEWLINE# def _pipeline( self , result = 'Unknown' , job_state = 'Scheduled' , scheduled_minutes_back = 20 ) : #NEWLINE# #INDENT# scheduled_date = ( time . time ( ) - ( 60 * ( scheduled_minutes_back or 20 ) ) ) #NEWLINE# return Response . _from_json ( { #NEWLINE# #INDENT# 'stages' : [ { #NEWLINE# #INDENT# 'scheduled' : True , #NEWLINE# 'jobs' : [ { #NEWLINE# #INDENT# 'id' : 1 , #NEWLINE# 'state' : job_state , #NEWLINE# 'result' : result , #NEWLINE# 'scheduled_date' : ( self * 1000 ) , #NEWLINE# 'name' : 'defaultJob' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# 'name' : 'defaultStage' , #NEWLINE# 'can_run' : False , #NEWLINE# 'operate_permission' : True , #NEWLINE# 'approval_type' : 'success' , #NEWLINE# 'counter' : '1' , #NEWLINE# 'approved_by' : 'changes' , #NEWLINE# 'result' : result , #NEWLINE# 'rerun_of_counter' : None , #NEWLINE# 'id' : 1 , #NEWLINE# #UNINDENT# } ] , #NEWLINE# 'result' : result , #NEWLINE# #UNINDENT# } )