1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 from cwltool.context import LoadingContext, RuntimeContext
6 from collections import namedtuple
8 class ArvLoadingContext(LoadingContext):
9 def __init__(self, kwargs=None):
10 super(ArvLoadingContext, self).__init__(kwargs)
12 class ArvRuntimeContext(RuntimeContext):
13 def __init__(self, kwargs=None):
15 self.extra_reffiles = []
17 self.enable_reuse = True
19 self.submit_request_uuid = None
20 self.project_uuid = None
21 self.trash_intermediate = False
22 self.intermediate_output_ttl = 0
23 self.update_workflow = ""
24 self.create_workflow = False
25 self.submit_runner_ram = 0
26 self.ignore_docker_for_reuse = False
28 self.submit_runner_image = None
30 self.cwl_runner_job = None
31 self.storage_classes = "default"
32 self.current_container = None
33 self.http_timeout = 300
34 self.submit_runner_cluster = None
35 self.cluster_target_id = 0
36 self.always_submit_runner = False
37 self.collection_cache_size = 256
39 super(ArvRuntimeContext, self).__init__(kwargs)
41 if self.submit_request_uuid:
42 self.submit_runner_cluster = self.submit_request_uuid[0:5]