diff options
author | Christopher Baines <mail@cbaines.net> | 2023-05-11 09:59:41 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-05-11 09:59:41 +0100 |
commit | dbe8802b5f00f91307c331516af2ffb8f14bfc50 (patch) | |
tree | 3714789ff5593fa0761f424aaffb805e9ec0a38e /guix-build-coordinator/agent-messaging | |
parent | 7c2e1a716471ea832509076707941945ba94f053 (diff) | |
download | build-coordinator-dbe8802b5f00f91307c331516af2ffb8f14bfc50.tar build-coordinator-dbe8802b5f00f91307c331516af2ffb8f14bfc50.tar.gz |
Have agents report on the progress of the coordinator hashing outputs
Otherwise it looks like the upload should finish, but hasn't.
Diffstat (limited to 'guix-build-coordinator/agent-messaging')
-rw-r--r-- | guix-build-coordinator/agent-messaging/http.scm | 12 |
1 files changed, 10 insertions, 2 deletions
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)) |