From 189fa1575252e714693a89fa459bb3d609a3b14b Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 30 Apr 2023 17:59:11 +0200 Subject: Stop monitoring uploads through the chunked output port Use the dump-port* progress reporter instead. --- guix-build-coordinator/agent-messaging/http.scm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'guix-build-coordinator/agent-messaging') diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm index 6e8490c..efcad50 100644 --- a/guix-build-coordinator/agent-messaging/http.scm +++ b/guix-build-coordinator/agent-messaging/http.scm @@ -41,12 +41,12 @@ #:use-module (gcrypt hash) #:use-module (lzlib) #:use-module ((gnutls) #:select (gnutls-version)) + #:use-module (guix progress) #:use-module ((guix config) #:select (%guix-version)) #:use-module ((guix utils) #:select (version>=?)) #:use-module (prometheus) #:use-module (guix store) #:use-module (guix base64) - #:use-module (guix serialization) #:use-module (guix build utils) #:use-module (guix-build-coordinator utils) #:use-module (guix-build-coordinator agent-messaging abstract) @@ -281,7 +281,7 @@ (lambda* (build-id output-name file #:key (log default-log) - report-bytes-sent) + reporter) (define file-size (stat:size (stat file))) @@ -365,7 +365,7 @@ (begin (log 'DEBUG "starting sending file from start") (set! %force-full-upload #f) - (report-bytes-sent 'reset))) + (progress-reporter-report! reporter 'reset))) ;; Still more to send (call-with-input-file file @@ -388,13 +388,10 @@ (lambda (port) (with-time-logging (simple-format #f "sending ~A" file) - (dump-port file-port port - #:buffer-size 65536))) + (dump-port* file-port port + #:reporter reporter))) #:headers `((Authorization . ,auth-value)) - #:method (if bytes 'POST 'PUT) - #:report-bytes-sent - (lambda args - (apply report-bytes-sent args))))) + #:method (if bytes 'POST 'PUT)))) (log 'DEBUG "perform upload " file ", response code: " (response-code response)) -- cgit v1.2.3