diff options
author | Peter Amstutz | 2020-07-08 14:02:11 -0400 |
---|---|---|
committer | Peter Amstutz | 2020-07-08 15:18:00 -0400 |
commit | cbb191cb23f4e40b1a1d3024401960939fda9bc3 (patch) | |
tree | 3cf9259067b1fcacfaf9d9488629eb390596f657 /bh20seqanalyzer | |
parent | 44e3c21ba89aa19c066148fdd18745f45e168d50 (diff) | |
download | bh20-seq-resource-cbb191cb23f4e40b1a1d3024401960939fda9bc3.tar.gz bh20-seq-resource-cbb191cb23f4e40b1a1d3024401960939fda9bc3.tar.lz bh20-seq-resource-cbb191cb23f4e40b1a1d3024401960939fda9bc3.zip |
Get count from arvados
Separate pending/rejected tables
"Lastest results" is latest successful run.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
Diffstat (limited to 'bh20seqanalyzer')
-rw-r--r-- | bh20seqanalyzer/main.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bh20seqanalyzer/main.py b/bh20seqanalyzer/main.py index 1746587..ce9a723 100644 --- a/bh20seqanalyzer/main.py +++ b/bh20seqanalyzer/main.py @@ -187,14 +187,15 @@ def get_workflow_output_from_project(api, uuid): cr = api.container_requests().list(filters=[['owner_uuid', '=', uuid], ["requesting_container_uuid", "=", None]]).execute() if cr["items"] and cr["items"][0]["output_uuid"]: - return cr["items"][0] - else: - return None + container = api.containers().get(uuid=cr["items"][0]["container_uuid"]).execute() + if container["state"] == "Complete" and container["exit_code"] == 0: + return cr["items"][0] + return None def copy_most_recent_result(api, analysis_project, latest_result_uuid): most_recent_analysis = api.groups().list(filters=[['owner_uuid', '=', analysis_project]], - order="created_at desc", limit=1).execute() + order="created_at desc").execute() for m in most_recent_analysis["items"]: wf = get_workflow_output_from_project(api, m["uuid"]) if wf: @@ -220,6 +221,7 @@ def move_fastq_to_fasta_results(api, analysis_project, uploader_project): body={"owner_uuid": uploader_project}).execute() p["properties"]["moved_output"] = True api.groups().update(uuid=p["uuid"], body={"properties": p["properties"]}).execute() + break def upload_schema(api, workflow_def_project): |