Skip to content

Commit cbb6bd9

Browse files
author
Peter Amstutz
committed
Set cachebuilder.outdir as appropriate
1 parent 34e433b commit cbb6bd9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cwltool/draft2tool.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ def job(self, joborder, input_basedir, output_callback, **kwargs):
135135
if docker_req and kwargs.get("use_container") is not False:
136136
dockerimg = docker_req.get("dockerImageId") or docker_req.get("dockerPull")
137137
cmdline = ["docker", "run", dockerimg] + cmdline
138-
139138
keydict = {"cmdline": cmdline}
140139

141140
for _,f in cachebuilder.pathmapper.items():
@@ -158,7 +157,13 @@ def job(self, joborder, input_basedir, output_callback, **kwargs):
158157

159158
jobcache = os.path.join(kwargs["cachedir"], cachekey)
160159
jobcachepending = jobcache + ".pending"
160+
161161
if os.path.isdir(jobcache) and not os.path.isfile(jobcachepending):
162+
if docker_req and kwargs.get("use_container") is not False:
163+
cachebuilder.outdir = kwargs.get("docker_outdir") or "/var/spool/cwl"
164+
else:
165+
cachebuilder.outdir = jobcache
166+
162167
class CallbackJob(object):
163168
def __init__(self, job, output_callback, cachebuilder, jobcache):
164169
self.job = job

0 commit comments

Comments
 (0)