aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent-messaging
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-05-11 17:30:04 +0100
committerChristopher Baines <mail@cbaines.net>2023-05-11 17:30:04 +0100
commitb2989d107ea87f36bc4684cadc0f416bc251d6cb (patch)
treef21e7ad6c5f65e3068e1c1838a1e23daefa5e893 /guix-build-coordinator/agent-messaging
parent64202d823d5a07537d791baf7eb0feafa854d429 (diff)
downloadbuild-coordinator-b2989d107ea87f36bc4684cadc0f416bc251d6cb.tar
build-coordinator-b2989d107ea87f36bc4684cadc0f416bc251d6cb.tar.gz
Clean up some handling of uploads for agents
This commit should correct the progress reporting on partial uploads.
Diffstat (limited to 'guix-build-coordinator/agent-messaging')
-rw-r--r--guix-build-coordinator/agent-messaging/http.scm8
1 files changed, 6 insertions, 2 deletions
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