aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator
diff options
context:
space:
mode:
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r--guix-build-coordinator/client-communication.scm28
1 files changed, 19 insertions, 9 deletions
diff --git a/guix-build-coordinator/client-communication.scm b/guix-build-coordinator/client-communication.scm
index e96b374..d121ca5 100644
--- a/guix-build-coordinator/client-communication.scm
+++ b/guix-build-coordinator/client-communication.scm
@@ -404,15 +404,25 @@
`(,build-coordinator
,derivation-file
#:read-drv
- ,(if (null? (or substitute-urls '()))
- read-drv/substitute
- (lambda (derivation-file)
- (call-with-worker-thread
- substitutes-channel
- (lambda ()
- (read-derivation-through-substitutes
- derivation-file
- substitute-urls)))))
+ ,(lambda (derivation-file)
+ (with-timeout 30
+ (begin
+ (log-msg (build-coordinator-logger build-coordinator)
+ 'WARN
+ "substituting derivation " derivation-file
+ " timed out")
+
+ (if (null? (or substitute-urls '()))
+ ;; Try again
+ (read-drv/substitute derivation-file)
+ (call-with-worker-thread
+ substitutes-channel
+ (lambda ()
+ (read-derivation-through-substitutes
+ derivation-file
+ substitute-urls)))))
+
+ (read-drv/substitute derivation-file)))
,@(let ((priority (assoc-ref body "priority")))
(if priority
`(#:priority ,priority)