diff options
author | Christopher Baines <mail@cbaines.net> | 2023-04-11 18:01:29 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-04-11 18:01:29 +0100 |
commit | 6d3b8c69770fdbbd55a7a94e9316ba2e32e98226 (patch) | |
tree | 2429903795928fc10c36087897de5b1ff402fb4a /guix-build-coordinator | |
parent | 70184bccff0d2c042ebd9cff3eeafa49376e46a3 (diff) | |
download | build-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.
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r-- | guix-build-coordinator/agent-messaging/http.scm | 60 |
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) |