aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-11-20 11:25:19 +0000
committerChristopher Baines <mail@cbaines.net>2023-11-20 11:25:19 +0000
commitc3a2e6795dc32ffa51a25e1c71bdfe23f92db1cd (patch)
tree1e2e5f06d4b6effc434c0e35718189704e1e532d
parentdbf0c4e452035bfb22218269ee0eec42d9c03750 (diff)
downloadbuild-coordinator-c3a2e6795dc32ffa51a25e1c71bdfe23f92db1cd.tar
build-coordinator-c3a2e6795dc32ffa51a25e1c71bdfe23f92db1cd.tar.gz
Use port timeouts when checking substitutes
As I think this is better than the alarm syscall.
-rw-r--r--guix-build-coordinator/agent.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm
index c6f2122..599a70a 100644
--- a/guix-build-coordinator/agent.scm
+++ b/guix-build-coordinator/agent.scm
@@ -712,12 +712,12 @@ unable to query substitute servers without caching"))
(if (list? non-derivation-substitute-urls)
(retry-on-error
(lambda ()
- (with-timeout 60 ; seconds
- (raise-exception
- (make-exception-with-message "timeout checking for substitutes (no cache)"))
- (has-substiutes-no-cache?
- non-derivation-substitute-urls
- file)))
+ (with-port-timeouts
+ (lambda ()
+ (has-substiutes-no-cache?
+ non-derivation-substitute-urls
+ file))
+ #:timeout (* 60 1000)))
#:times 20
#:delay (random 15))
#f)))