jobs.py 文件源码

python
阅读 42 收藏 0 点赞 0 评论 0

项目:boomerang 作者: EmersonElectricCo 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号