|
9 | 9 | import re
|
10 | 10 | import shutil
|
11 | 11 | import tempfile
|
| 12 | +import threading |
12 | 13 | from functools import cmp_to_key, partial
|
13 | 14 | from typing import (Any, Callable, Dict, # pylint: disable=unused-import
|
14 | 15 | Generator, List, Optional, Set, Text, Type, TYPE_CHECKING,
|
@@ -295,10 +296,10 @@ def job(self,
|
295 | 296 | separateDirs=False)
|
296 | 297 | _check_adjust = partial(check_adjust, cachebuilder)
|
297 | 298 | visit_class([cachebuilder.files, cachebuilder.bindings],
|
298 |
| - ("File", "Directory"), _check_adjust) |
| 299 | + ("File", "Directory"), _check_adjust) |
299 | 300 |
|
300 | 301 | cmdline = flatten(list(map(cachebuilder.generate_arg, cachebuilder.bindings)))
|
301 |
| - (docker_req, docker_is_req) = self.get_requirement("DockerRequirement") |
| 302 | + (docker_req, _) = self.get_requirement("DockerRequirement") |
302 | 303 | if docker_req and runtimeContext.use_container:
|
303 | 304 | dockerimg = docker_req.get("dockerImageId") or docker_req.get("dockerPull")
|
304 | 305 | elif runtimeContext.default_container is not None and runtimeContext.use_container:
|
@@ -346,7 +347,8 @@ def job(self,
|
346 | 347 | keydictstr, cachekey)
|
347 | 348 |
|
348 | 349 | jobcache = os.path.join(runtimeContext.cachedir, cachekey)
|
349 |
| - jobcachepending = jobcache + ".pending" |
| 350 | + jobcachepending = "{}.{}.pending".format( |
| 351 | + jobcache, threading.current_thread().ident) |
350 | 352 |
|
351 | 353 | if os.path.isdir(jobcache) and not os.path.isfile(jobcachepending):
|
352 | 354 | if docker_req and runtimeContext.use_container:
|
|
0 commit comments