diff options
author | Christopher Baines <mail@cbaines.net> | 2023-04-30 17:59:11 +0200 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-04-30 17:59:11 +0200 |
commit | 189fa1575252e714693a89fa459bb3d609a3b14b (patch) | |
tree | 3005f793df72bb3f7a5077438c0e117333aa3fd0 /guix-build-coordinator/agent-messaging/http.scm | |
parent | cdad24aa4f13196d53c53a83b7263c74633d94ab (diff) | |
download | build-coordinator-189fa1575252e714693a89fa459bb3d609a3b14b.tar build-coordinator-189fa1575252e714693a89fa459bb3d609a3b14b.tar.gz |
Stop monitoring uploads through the chunked output port
Use the dump-port* progress reporter instead.
Diffstat (limited to 'guix-build-coordinator/agent-messaging/http.scm')
-rw-r--r-- | guix-build-coordinator/agent-messaging/http.scm | 15 |
1 files changed, 6 insertions, 9 deletions
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)) |