X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/33c10053b22fd5065516eb7df4c58b55a70d490c..b5d0e0ad775eb822b9ab4bed5b57c2e9072f4c0b:/sdk/cwl/arvados_cwl/context.py diff --git a/sdk/cwl/arvados_cwl/context.py b/sdk/cwl/arvados_cwl/context.py index 81e256ed54..64f85e2076 100644 --- a/sdk/cwl/arvados_cwl/context.py +++ b/sdk/cwl/arvados_cwl/context.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 from cwltool.context import LoadingContext, RuntimeContext +from collections import namedtuple class ArvLoadingContext(LoadingContext): def __init__(self, kwargs=None): @@ -28,6 +29,30 @@ class ArvRuntimeContext(RuntimeContext): self.wait = True self.cwl_runner_job = None self.storage_classes = "default" + self.intermediate_storage_classes = "default" self.current_container = None + self.http_timeout = 300 + self.submit_runner_cluster = None + self.cluster_target_id = 0 + self.always_submit_runner = False + self.collection_cache_size = 256 + self.match_local_docker = False + self.enable_preemptible = None + self.copy_deps = None super(ArvRuntimeContext, self).__init__(kwargs) + + if self.submit_request_uuid: + self.submit_runner_cluster = self.submit_request_uuid[0:5] + + def get_outdir(self) -> str: + """Return self.outdir or create one with self.tmp_outdir_prefix.""" + return self.outdir + + def get_tmpdir(self) -> str: + """Return self.tmpdir or create one with self.tmpdir_prefix.""" + return self.tmpdir + + def create_tmpdir(self) -> str: + """Return self.tmpdir or create one with self.tmpdir_prefix.""" + return self.tmpdir