Exemple #1
0
def job(username, root_wf_id, wf_id, job_id, job_instance_id):
    """
    Get details of a specific job instance.
    """
    dashboard = Dashboard(g.master_db_url, root_wf_id, wf_id)
    job = dashboard.get_job_information(wf_id, job_id, job_instance_id)
    job_states = dashboard.get_job_states(wf_id, job_id, job_instance_id)
    job_instances = dashboard.get_job_instances(wf_id, job_id)

    previous = None

    for state in job_states:
        timestamp = state.timestamp
        state.timestamp = datetime.fromtimestamp(state.timestamp).strftime("%a %b %d, %Y %I:%M:%S %p")

        if previous is None:
            state.interval = 0.0
        else:
            state.interval = timestamp - previous

        previous = timestamp

    if not job:
        return "Bad Request", 400

    return render_template(
        "workflow/job/job_details.html",
        root_wf_id=root_wf_id,
        wf_id=wf_id,
        job_id=job_id,
        job=job,
        job_instances=job_instances,
        job_states=job_states,
    )
Exemple #2
0
def job(username, root_wf_id, wf_id, job_id, job_instance_id):
    """
    Get details of a specific job instance.
    """
    dashboard = Dashboard(g.master_db_url, root_wf_id, wf_id)
    job = dashboard.get_job_information(wf_id, job_id, job_instance_id)
    job_states = dashboard.get_job_states(wf_id, job_id, job_instance_id)
    job_instances = dashboard.get_job_instances(wf_id, job_id)

    previous = None

    for state in job_states:
        timestamp = state.timestamp
        state.timestamp = datetime.fromtimestamp(state.timestamp).strftime('%a %b %d, %Y %I:%M:%S %p')

        if previous is None:
            state.interval = 0.0
        else:
            state.interval = timestamp - previous

        previous = timestamp

    if not job:
        return 'Bad Request', 400

    return render_template('workflow/job/job_details.html', root_wf_id=root_wf_id, wf_id=wf_id, job_id=job_id, job=job,
                           job_instances=job_instances, job_states=job_states)
Exemple #3
0
def job(username, root_wf_id, wf_id, job_id, job_instance_id):
    """
    Get details of a specific job instance.
    """
    dashboard = Dashboard(g.master_db_url, root_wf_id, wf_id)
    job = dashboard.get_job_information(wf_id, job_id, job_instance_id)
    job_states = dashboard.get_job_states(wf_id, job_id, job_instance_id)
    job_instances = dashboard.get_job_instances(wf_id, job_id)

    if not job:
        return "Bad Request", 400

    return render_template(
        "workflow/job/job_details.html",
        root_wf_id=root_wf_id,
        wf_id=wf_id,
        job_id=job_id,
        job=job,
        job_instances=job_instances,
        job_states=job_states,
    )