From dbe8802b5f00f91307c331516af2ffb8f14bfc50 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 11 May 2023 09:59:41 +0100 Subject: Have agents report on the progress of the coordinator hashing outputs Otherwise it looks like the upload should finish, but hasn't. --- guix-build-coordinator/agent-messaging/http.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'guix-build-coordinator/agent-messaging/http.scm') diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm index 9a2732d..01a2c15 100644 --- a/guix-build-coordinator/agent-messaging/http.scm +++ b/guix-build-coordinator/agent-messaging/http.scm @@ -281,7 +281,8 @@ (lambda* (build-id output-name file #:key (log default-log) - reporter) + reporter + report-bytes-hashed) (define file-size (stat:size (stat file))) @@ -377,7 +378,14 @@ #:reporter reporter))) #:binary #t))) #:headers `((Authorization . ,auth-value)) - #:method (if bytes 'POST 'PUT)))) + #:method (if bytes 'POST 'PUT) + #:streaming? #t))) + + (let loop ((line (get-line body))) + (unless (eof-object? line) + (report-bytes-hashed + (string->number line)) + (loop (get-line body)))) (log 'DEBUG "perform upload " file ", response code: " (response-code response)) -- cgit v1.2.3