diff options
Diffstat (limited to 'guix-build-coordinator/agent.scm')
-rw-r--r-- | guix-build-coordinator/agent.scm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm index f8a95fa..eabb917 100644 --- a/guix-build-coordinator/agent.scm +++ b/guix-build-coordinator/agent.scm @@ -49,10 +49,11 @@ #:export (run-agent)) (define-record-type <upload-progress> - (make-upload-progress file bytes-sent) + (make-upload-progress file bytes-sent total-bytes) upload-progress? (file upload-progress-file) - (bytes-sent upload-progress-bytes-sent set-upload-progress-bytes-sent!)) + (bytes-sent upload-progress-bytes-sent set-upload-progress-bytes-sent!) + (total-bytes upload-progress-total-bytes)) (define temporary-directory (or (getenv "TMPDIR") "/tmp")) @@ -121,7 +122,7 @@ (define (with-upload-monitoring lgr file total-bytes p) (define upload-progress-record - (make-upload-progress file 0)) + (make-upload-progress file 0 total-bytes)) (define last-progress-update-bytes-sent 0) (define last-progress-update-time 0) @@ -162,7 +163,8 @@ (/ (upload-progress-bytes-sent upload-progress) 1000000) - (/ total-bytes 1000000)) + (/ (upload-progress-total-bytes upload-progress) + 1000000)) "MB sent"))) upload-slots))))) |