Skip to content

Commit

Permalink
Fix bug in returning outputs from WES
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-kotliar committed Oct 9, 2019
1 parent 16b6276 commit c74272c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cwl_airflow/wes/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class CWLAirflowBackend():
# curl -X GET "127.0.0.1:8081/api/experimental/wes/runs" -H "accept: application/json"
# curl -X POST "127.0.0.1:8081/api/experimental/wes/runs/pracfcizfvmhdefxqdomtxktkbflhgav/cancel" -H "accept: application/json"

# curl -X GET "127.0.0.1:8081/api/experimental/wes/runs/pracfcizfvmhdefxqdomtxktkbflhgav" -H "accept: application/json"
# curl -X GET "127.0.0.1:8081/api/experimental/wes/runs/zlqukumkxxfkumrevclzjcsbyuguhwqy" -H "accept: application/json"
# curl -X GET "127.0.0.1:8081/api/experimental/wes/runs/pracfcizfvmhdefxqdomtxktkbflhgav/status" -H "accept: application/json"
# curl -X POST "127.0.0.1:8081/api/experimental/wes/runs" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "workflow_attachment[][email protected]"

Expand Down Expand Up @@ -297,7 +297,10 @@ def wes_get_run_log(self, run_id):
dag_run = DagRun.find(dag_id=run_id, state=None)[0]
workflow_params = dag_run.conf["job"]
del workflow_params["id"]
workflow_outputs = dag_run.get_task_instance(task_id="CWLJobGatherer").xcom_pull()["promises"]
try:
workflow_outputs = dag_run.get_task_instance(task_id="CWLJobGatherer").xcom_pull()[0]
except Exception:
workflow_outputs = {}
return {
"run_id": run_id,
"request": {"workflow_params": workflow_params},
Expand Down

0 comments on commit c74272c

Please sign in to comment.