#NEWLINE# def kill( options ) : #NEWLINE# #INDENT# '\n    kill a specific job by id\n\n    ' #NEWLINE# configuration = config . get_default ( ) #NEWLINE# app_url = configuration [ 'app_url' ] #NEWLINE# if ( options . deployment != None ) : #NEWLINE# #INDENT# deployment_name = client_id . deployment #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# deployment_name = configuration [ 'deployment_name' ] #NEWLINE# #UNINDENT# client_id = configuration [ 'client_id' ] #NEWLINE# client_secret = configuration [ 'client_secret' ] #NEWLINE# token_manager = auth . TokenManager ( client_id = client_id , client_secret = client_secret , app_url = app_url ) #NEWLINE# job_details = data_engine . get_job_details ( options . job_id , deployment_name , token_manager = token_manager , app_url = app_url ) #NEWLINE# options . format = 'table' #NEWLINE# if options . yes : #NEWLINE# #INDENT# decision = 'Y' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# _print_jobs ( [ job_details ] , token_manager , app_url , options ) #NEWLINE# decision = prompt ( 'Are you sure you want to delete the above job? (Y/N)' ) #NEWLINE# #UNINDENT# if ( decision == 'Y' ) : #NEWLINE# #INDENT# data_engine . delete_job ( options . job_id . strip ( ) , deployment_name , token_manager = token_manager , app_url = app_url ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise JutException ( ( 'Unexpected option "%s"' % decision ) )