aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent-messaging/http.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-10-14 13:49:23 +0100
committerChristopher Baines <mail@cbaines.net>2022-10-14 13:49:23 +0100
commit5d9a490e0d5bd150e7100fc03fdaf684835fac9a (patch)
tree36ea8b2d271b1cab4d982b478285e4fb3cff8073 /guix-build-coordinator/agent-messaging/http.scm
parent8b88e02ab738eae581bb1c19873b9bf6542084a9 (diff)
downloadbuild-coordinator-5d9a490e0d5bd150e7100fc03fdaf684835fac9a.tar
build-coordinator-5d9a490e0d5bd150e7100fc03fdaf684835fac9a.tar.gz
Shorten timeout when submitting outputs
By resetting the timeout while the file is being uploaded.
Diffstat (limited to 'guix-build-coordinator/agent-messaging/http.scm')
-rw-r--r--guix-build-coordinator/agent-messaging/http.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm
index a530efd..7db94c3 100644
--- a/guix-build-coordinator/agent-messaging/http.scm
+++ b/guix-build-coordinator/agent-messaging/http.scm
@@ -337,7 +337,7 @@
(seek file-port bytes SEEK_SET)
(log 'INFO "resuming upload from byte " bytes))
- (with-timeout (* 3600 2) ; 2 hours
+ (with-timeout (* 5 60) ; 5 minutes
(raise-exception
(make-exception-with-message "timeout submitting output"))
(let-values (((response body)
@@ -350,7 +350,10 @@
#:buffer-size 65536)))
#:headers `((Authorization . ,auth-value))
#:method (if bytes 'POST 'PUT)
- #:report-bytes-sent report-bytes-sent)))
+ #:report-bytes-sent
+ (lambda args
+ (reset-timeout (* 5 60))
+ (apply report-bytes-sent args)))))
(when (>= (response-code response) 400)
(raise-exception
(make-exception-with-message