aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-03-26 15:03:14 +0100
committerLudovic Courtès <ludo@gnu.org>2014-03-26 15:06:52 +0100
commit236e66481d7d8f61be2f2c1cb81cddb7b9db03d4 (patch)
treecf33c93c2637a8bc4496922cd0dd2da7b9bae945
parent3dfd8af534a7cab94d8bb60c1554944d48911f6c (diff)
downloadguix-236e66481d7d8f61be2f2c1cb81cddb7b9db03d4.tar.gz
guix-236e66481d7d8f61be2f2c1cb81cddb7b9db03d4.zip
offload: Allow one transfer in each direction simultaneously.
* guix/scripts/offload.scm (transfer-and-offload): Use 'upload' lock instead of 'bandwidth' around 'send-files' calls, and 'download' lock around 'retrieve-files' call.
-rw-r--r--guix/scripts/offload.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index 2936a262e1..755453704e 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -324,10 +324,10 @@ 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
INPUTS to MACHINE; if building DRV succeeds, retrieve all of OUTPUTS from
MACHINE."
- ;; Acquire MACHINE's exclusive lock to serialize file transfers
- ;; to/from MACHINE in the presence of several 'offload' hook
- ;; instance.
- (when (with-machine-lock machine 'bandwidth
+ ;; Acquire MACHINE's upload or download lock to serialize file transfers in
+ ;; a given direction to/from MACHINE in the presence of several 'offload'
+ ;; hook instance.
+ (when (with-machine-lock machine 'upload
(send-files (cons (derivation-file-name drv) inputs)
machine))
(let ((status (offload drv machine
@@ -337,7 +337,7 @@ MACHINE."
(if (zero? status)
(begin
;; Likewise (see above.)
- (with-machine-lock machine 'bandwidth
+ (with-machine-lock machine 'download
(retrieve-files outputs machine))
(format (current-error-port)
"done with offloaded '~a'~%"