def run(jobname): """Send job from queue to the machine.""" job = _get(jobname) if not driveboard.status()['ready']: bottle.abort(400, "Machine not ready.") driveboard.job(json.loads(job)) return '{}'
def run(jobname): """Send job from queue to the machine.""" job = _get(jobname) if not driveboard.status()['ready']: bottle.abort(400, "Machine not ready.") driveboard.job(json.loads(job)) return '{}'
def run_direct(): """Run an dba job directly, by-passing the queue. Args: (Args come in through the POST request.) job: Parsed dba job. """ load_request = json.loads(bottle.request.forms.get('load_request')) job = load_request.get('job') # always a string # sanity check if job is None: bottle.abort(400, "Invalid request data.") driveboard.job(json.loads(job)) return '{}'
def run_direct(): """Run an dba job directly, by-passing the queue. Args: (Args come in through the POST request.) job: Parsed dba job. """ load_request = json.loads(bottle.request.forms.get('load_request')) job = load_request.get('job') # always a string # sanity check if job is None: bottle.abort(400, "Invalid request data.") driveboard.job(json.loads(job)) return '{}'