offload: Include the port number in the machine lock file name.

This is useful when a single machine appears several time, with
different port numbers.

* guix/scripts/offload.scm (machine-slot-file): Add MACHINE's port to
the file name.
This commit is contained in:
Ludovic Courtès 2019-09-28 17:22:39 +02:00
parent 44941fd7db
commit a3af06ad65
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -243,7 +243,8 @@ (define (machine-slot-file machine slot)
;; of these; if we fail, that means all the build slots are already taken.
;; Inspired by Nix's build-remote.pl.
(string-append (string-append %state-directory "/offload/"
(build-machine-name machine)
(build-machine-name machine) ":"
(number->string (build-machine-port machine))
"/" (number->string slot))))
(define (acquire-build-slot machine)