phase1: workers are running a single build
authorThibaut VARÈNE <hacks@slashdirt.org>
Wed, 26 Oct 2022 19:34:19 +0000 (21:34 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 15 May 2023 15:36:01 +0000 (17:36 +0200)
Worker lock on dl/ is now unnecessary

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
phase1/master.cfg

index 95a6feee0510a2e6761edd12f45d47ea80f20d0a..4bd2f0db295ad7a19cfc0c45beba5e5cb8d830b6 100644 (file)
@@ -503,14 +503,12 @@ def MakeEnv(overrides=None, tryccache=False):
 @properties.renderer
 def NetLockDl(props, extralock=None):
        lock = None
-       locks = []
        if props.hasProperty("dl_lock"):
                lock = NetLocks[props["dl_lock"]]
        if lock is not None:
-               locks.append(lock.access('exclusive'))
-       if extralock is not None:
-               locks.append(extralock)
-       return locks
+               return [lock.access('exclusive')]
+       else:
+               return []
 
 @properties.renderer
 def NetLockUl(props):
@@ -547,8 +545,6 @@ def UsignSec2Pub(props):
 
 c['builders'] = []
 
-dlLock = locks.WorkerLock("worker_dl")
-
 workerNames = [ ]
 
 for worker in c['workers']:
@@ -802,7 +798,7 @@ for target in targets:
                command = ["make", Interpolate("-j%(prop:nproc:-1)s"), "download", "V=s"],
                env = MakeEnv(),
                logEnviron = False,
-               locks = NetLockDl.withArgs(dlLock.access('exclusive')),
+               locks = NetLockDl,
        ))
 
        factory.addStep(ShellCommand(