aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-04-11 18:01:29 +0100
committerChristopher Baines <mail@cbaines.net>2023-04-11 18:01:29 +0100
commit6d3b8c69770fdbbd55a7a94e9316ba2e32e98226 (patch)
tree2429903795928fc10c36087897de5b1ff402fb4a
parent70184bccff0d2c042ebd9cff3eeafa49376e46a3 (diff)
downloadbuild-coordinator-6d3b8c69770fdbbd55a7a94e9316ba2e32e98226.tar
build-coordinator-6d3b8c69770fdbbd55a7a94e9316ba2e32e98226.tar.gz
Remove the crude alarm based timeout for submitting outputs
This should be unnecessary now that there's progress on getting the I/O operations to timeout.
-rw-r--r--guix-build-coordinator/agent-messaging/http.scm60
1 files changed, 25 insertions, 35 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm
index adc8102..9d73119 100644
--- a/guix-build-coordinator/agent-messaging/http.scm
+++ b/guix-build-coordinator/agent-messaging/http.scm
@@ -326,12 +326,6 @@
(define %force-full-upload #t)
(define (perform-upload)
- (define reset-timeout/throttled
- (throttle
- 120
- (lambda ()
- (reset-timeout (* 5 60)))))
-
(let* ((partial-upload-bytes (get-partial-upload-bytes))
(completed-upload-bytes (get-completed-upload-bytes))
(bytes (if %force-full-upload
@@ -387,35 +381,31 @@
"/partial"
"")))))
- (with-timeout (* 5 60) ; 5 minutes
- (raise-exception
- (make-exception-with-message "timeout submitting output"))
- (let-values (((response body)
- (call-with-streaming-http-request
- upload-uri
- (lambda (port)
- (with-time-logging
- (simple-format #f "sending ~A" file)
- (dump-port file-port port
- #:buffer-size 65536)))
- #:headers `((Authorization . ,auth-value))
- #:method (if bytes 'POST 'PUT)
- #:report-bytes-sent
- (lambda args
- (reset-timeout/throttled)
- (apply report-bytes-sent args)))))
- (log 'DEBUG "perform upload " file ", response code: "
- (response-code response))
-
- (when (>= (response-code response) 400)
- (raise-exception
- (make-exception-with-message
- (coordinator-handle-failed-request
- log
- 'PUT
- (uri-path upload-uri)
- response
- body)))))))))))))
+ (let-values (((response body)
+ (call-with-streaming-http-request
+ upload-uri
+ (lambda (port)
+ (with-time-logging
+ (simple-format #f "sending ~A" file)
+ (dump-port file-port port
+ #:buffer-size 65536)))
+ #:headers `((Authorization . ,auth-value))
+ #:method (if bytes 'POST 'PUT)
+ #:report-bytes-sent
+ (lambda args
+ (apply report-bytes-sent args)))))
+ (log 'DEBUG "perform upload " file ", response code: "
+ (response-code response))
+
+ (when (>= (response-code response) 400)
+ (raise-exception
+ (make-exception-with-message
+ (coordinator-handle-failed-request
+ log
+ 'PUT
+ (uri-path upload-uri)
+ response
+ body))))))))))))
(unless (and=>
(get-completed-upload-bytes)