def get_job_results(job_id):
"""Get data from previous jobs
:param job_id: ID number to get results of job
:return: results_path - path to the job data
This checks to see if the job that you are looking for exists, and returns the path to that job's data
"""
if not os.path.exists(os.path.join(app.config['BOOMERANG_FETCH_DIR'], str(job_id))):
raise ValueError("Job Does not Exist")
results_path = os.path.join(app.config['BOOMERANG_FETCH_DIR'], str(job_id), "results.zip")
if not os.path.isfile(results_path):
raise ValueError("Results not there...")
return results_path
评论列表
文章目录