#NEWLINE# @ bp . route ( '/<int:project_id>/job/<int:id>/restart/' ) #NEWLINE# def job_restart( project_id , id ) : #NEWLINE# #INDENT# project = get_project ( project , for_management = True ) #NEWLINE# job = project . builds . join ( Job ) . filter ( ( Job . id == id ) ) . with_entities ( Job ) . first_or_404 ( ) #NEWLINE# restart_job . delay ( job . id ) #NEWLINE# job . build . set_status ( 'enqueued' ) #NEWLINE# db . session . commit ( ) #NEWLINE# return redirect ( url_for ( '.build' , project_id = project . id , id = job . build . id ) )