def job_from_request():
 from digits.webapp import scheduler
 job_id = get_request_arg('job_id')
 if (job_id is None):
  raise werkzeug.exceptions.BadRequest('job_id is a required field')
 job = scheduler.get_job(job_id)
 if (job is None):
  raise werkzeug.exceptions.NotFound('Job not found')
 else:
  return job

def job_from_request ( ) : from digits . webapp import scheduler job_id = get_request_arg ( 'job_id' ) if ( job_id is None ) : raise werkzeug . exceptions . BadRequest ( 'job_id is a required field' ) job = scheduler . get_job ( job_id ) if ( job is None ) : raise werkzeug . exceptions . NotFound ( 'Job not found' ) else : return job
returns the job after grabbing job_id from request .