X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/88c26c6b2dd8752ec1ff8196f4af11369ea6adbb..0b51ce6bfc3c50155de18eb4440021688462fb6a:/sdk/cwl/arvados_cwl/crunch_script.py diff --git a/sdk/cwl/arvados_cwl/crunch_script.py b/sdk/cwl/arvados_cwl/crunch_script.py index 9ea4824557..7fbbd29d50 100644 --- a/sdk/cwl/arvados_cwl/crunch_script.py +++ b/sdk/cwl/arvados_cwl/crunch_script.py @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + # Crunch script integration for running arvados-cwl-runner (importing # arvados_cwl module) inside a crunch job. # @@ -19,7 +23,8 @@ import re import functools from arvados.api import OrderedJsonModel -from cwltool.process import shortname, adjustFileObjs, adjustDirObjs, normalizeFilesDirs +from cwltool.process import shortname +from cwltool.pathmapper import adjustFileObjs, adjustDirObjs, normalizeFilesDirs from cwltool.load_tool import load_tool from cwltool.errors import WorkflowException @@ -52,7 +57,8 @@ def run(): return v def keeppathObj(v): - v["location"] = keeppath(v["location"]) + if "location" in v: + v["location"] = keeppath(v["location"]) for k,v in job_order_object.items(): if isinstance(v, basestring) and arvados.util.keep_locator_pattern.match(v): @@ -109,6 +115,8 @@ def run(): args.name = None args.cwl_runner_job={"uuid": arvados.current_job()["uuid"], "state": arvados.current_job()["state"]} args.make_fs_access = make_fs_access + args.trash_intermediate = False + args.intermediate_output_ttl = 0 runner.arv_executor(t, job_order_object, **vars(args)) except Exception as e: