Skip to content

Commit bc20340

Browse files
author
Peter Amstutz
committed
Tweak exception catching, always return workflow uuid once we have one.
1 parent b5bf2ff commit bc20340

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

wes_service/arvados_wes.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -199,25 +199,23 @@ def RunWorkflow(self, **args):
199199

200200
try:
201201
tempdir, body = self.collect_attachments(cr["uuid"])
202+
203+
workflow_url = body.get("workflow_url")
204+
205+
project_uuid = body.get("workflow_engine_parameters", {}).get("project_uuid")
206+
207+
threading.Thread(target=self.invoke_cwl_runner, args=(cr["uuid"],
208+
workflow_url,
209+
body["workflow_params"],
210+
env,
211+
project_uuid,
212+
tempdir)).start()
213+
202214
except Exception as e:
203215
self.log_for_run(cr["uuid"], str(e))
204216
cr = api.container_requests().update(uuid=cr["uuid"],
205217
body={"container_request":
206218
{"priority": 0}}).execute()
207-
208-
return {"run_id": cr["uuid"]}
209-
210-
workflow_url = body.get("workflow_url")
211-
212-
project_uuid = body.get("workflow_engine_parameters", {}).get("project_uuid")
213-
214-
threading.Thread(target=self.invoke_cwl_runner, args=(cr["uuid"],
215-
workflow_url,
216-
body["workflow_params"],
217-
env,
218-
project_uuid,
219-
tempdir)).start()
220-
221219
return {"run_id": cr["uuid"]}
222220

223221
@catch_exceptions

0 commit comments

Comments
 (0)