From b2989d107ea87f36bc4684cadc0f416bc251d6cb Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 11 May 2023 17:30:04 +0100 Subject: Clean up some handling of uploads for agents This commit should correct the progress reporting on partial uploads. --- guix-build-coordinator/agent-messaging/http.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 01a2c15..d2e0e0e 100644 --- a/guix-build-coordinator/agent-messaging/http.scm +++ b/guix-build-coordinator/agent-messaging/http.scm @@ -281,6 +281,7 @@ (lambda* (build-id output-name file #:key (log default-log) + reporter-set-bytes-already-sent reporter report-bytes-hashed) (define file-size @@ -352,8 +353,11 @@ ", partial upload bytes: " bytes ")") (begin (log 'DEBUG "starting sending file from start") - (set! %force-full-upload #f) - (progress-reporter-report! reporter 'reset)))) + + ;; Set this to enable partial uploads when retrying + (set! %force-full-upload #f)))) + + (reporter-set-bytes-already-sent (or bytes 0)) (let* ((bytes-to-send (if bytes -- cgit v1.2.3