@blueprint.route('/datasets/<job_id>/abort', methods=['POST'])
@blueprint.route('/models/<job_id>/abort', methods=['POST'])
@blueprint.route('/jobs/<job_id>/abort', methods=['POST'])
@utils.auth.requires_login(redirect=False)
def abort_job(job_id):
 job = scheduler.get_job(job_id)
 if (job is None):
  raise werkzeug.exceptions.NotFound('Job not found')
 if scheduler.abort_job(job_id):
  return 'Job aborted.'
 else:
  raise werkzeug.exceptions.Forbidden('Job not aborted')

@ blueprint . route ( '/datasets/<job_id>/abort' , methods = [ 'POST' ] ) @ blueprint . route ( '/models/<job_id>/abort' , methods = [ 'POST' ] ) @ blueprint . route ( '/jobs/<job_id>/abort' , methods = [ 'POST' ] ) @ utils . auth . requires_login ( redirect = False ) def abort_job ( job_id ) : job = scheduler . get_job ( job_id ) if ( job is None ) : raise werkzeug . exceptions . NotFound ( 'Job not found' ) if scheduler . abort_job ( job_id ) : return 'Job aborted.' else : raise werkzeug . exceptions . Forbidden ( 'Job not aborted' )
aborts a running job .