offload: Remove mutual exclusion on transfers.
Suggested by Mark H. Weaver <mhw@netris.org> at <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00352.html>. * guix/scripts/offload.scm (transfer-and-offload): Remove uses of 'with-machine-lock'.
This commit is contained in:
parent
d2d0514b58
commit
940a8c57be
|
@ -410,10 +410,7 @@ there, and write the build log to LOG-PORT. Return the exit status."
|
||||||
"Offload DRV to MACHINE. Prior to the actual offloading, transfer all of
|
"Offload DRV to MACHINE. Prior to the actual offloading, transfer all of
|
||||||
INPUTS to MACHINE; if building DRV succeeds, retrieve all of OUTPUTS from
|
INPUTS to MACHINE; if building DRV succeeds, retrieve all of OUTPUTS from
|
||||||
MACHINE."
|
MACHINE."
|
||||||
;; Acquire MACHINE's upload or download lock to serialize file transfers in
|
(when (begin
|
||||||
;; a given direction to/from MACHINE in the presence of several 'offload'
|
|
||||||
;; hook instance.
|
|
||||||
(when (with-machine-lock machine 'upload
|
|
||||||
(register-gc-root (derivation-file-name drv) machine)
|
(register-gc-root (derivation-file-name drv) machine)
|
||||||
(send-files (cons (derivation-file-name drv) inputs)
|
(send-files (cons (derivation-file-name drv) inputs)
|
||||||
machine))
|
machine))
|
||||||
|
@ -423,9 +420,7 @@ MACHINE."
|
||||||
#:build-timeout build-timeout)))
|
#:build-timeout build-timeout)))
|
||||||
(if (zero? status)
|
(if (zero? status)
|
||||||
(begin
|
(begin
|
||||||
;; Likewise (see above.)
|
(retrieve-files outputs machine)
|
||||||
(with-machine-lock machine 'download
|
|
||||||
(retrieve-files outputs machine))
|
|
||||||
(remove-gc-roots machine)
|
(remove-gc-roots machine)
|
||||||
(format (current-error-port)
|
(format (current-error-port)
|
||||||
"done with offloaded '~a'~%"
|
"done with offloaded '~a'~%"
|
||||||
|
|
Loading…
Reference in New Issue