aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-03-29 09:30:53 +0100
committerChristopher Baines <mail@cbaines.net>2023-03-29 09:30:53 +0100
commitba006b2cd3ea52a39f422c6259e04ec63e9d08e4 (patch)
tree9fb3deb5b55a890e41c95fcecd2a055ca3e3fd4f
parent94ef31c4ec96889b3e9a44971d81bdc687abfbca (diff)
downloadbuild-coordinator-ba006b2cd3ea52a39f422c6259e04ec63e9d08e4.tar
build-coordinator-ba006b2cd3ea52a39f422c6259e04ec63e9d08e4.tar.gz
Switch the timeout approach for guix-data-service requests
In case this helps with avoiding hooks hanging.
-rw-r--r--guix-build-coordinator/guix-data-service.scm16
1 files changed, 7 insertions, 9 deletions
diff --git a/guix-build-coordinator/guix-data-service.scm b/guix-build-coordinator/guix-data-service.scm
index 26f9c88..5957ed2 100644
--- a/guix-build-coordinator/guix-data-service.scm
+++ b/guix-build-coordinator/guix-data-service.scm
@@ -42,15 +42,13 @@
(let*-values
(((response body)
- (with-timeout 30 ; 30 seconds
- (raise-exception
- (make-exception-with-message
- "timeout making guix-data-service request"))
- (http-post target-url
- #:body body
- ;; Guile doesn't treat JSON as text, so decode the
- ;; body manually
- #:decode-body? #f)))
+ (with-port-timeouts
+ (lambda ()
+ (http-post target-url
+ #:body body
+ ;; Guile doesn't treat JSON as text, so decode the
+ ;; body manually
+ #:decode-body? #f))))
((code)
(response-code response)))
(unless (and (>= code 200)