aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent-messaging/http.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-10-14 13:50:12 +0100
committerChristopher Baines <mail@cbaines.net>2022-10-14 13:50:12 +0100
commit91089b5dd0f2d6a802fc4f329f19f012bb7fb2c2 (patch)
tree87e739c9b4161691f4f4ed1fd02342232f032d27 /guix-build-coordinator/agent-messaging/http.scm
parent5d9a490e0d5bd150e7100fc03fdaf684835fac9a (diff)
downloadbuild-coordinator-91089b5dd0f2d6a802fc4f329f19f012bb7fb2c2.tar
build-coordinator-91089b5dd0f2d6a802fc4f329f19f012bb7fb2c2.tar.gz
Add more logging around file uploads
Diffstat (limited to 'guix-build-coordinator/agent-messaging/http.scm')
-rw-r--r--guix-build-coordinator/agent-messaging/http.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm
index 7db94c3..c331052 100644
--- a/guix-build-coordinator/agent-messaging/http.scm
+++ b/guix-build-coordinator/agent-messaging/http.scm
@@ -325,10 +325,11 @@
;; Check if the server has all the bytes
(unless (and bytes
(eq? bytes file-size))
- (when bytes
- (log 'DEBUG "still more to send (bytes: " file-size
- ", partial upload bytes: " partial-upload-bytes
- ", completed upload bytes: " completed-upload-bytes ")"))
+ (if bytes
+ (log 'DEBUG "still more to send (bytes: " file-size
+ ", partial upload bytes: " partial-upload-bytes
+ ", completed upload bytes: " completed-upload-bytes ")")
+ (log 'DEBUG "starting sending file from start"))
;; Still more to send
(call-with-input-file file
@@ -354,6 +355,9 @@
(lambda args
(reset-timeout (* 5 60))
(apply report-bytes-sent args)))))
+ (log 'DEBUG "perform upload " file ", response code: "
+ (response-code response))
+
(when (>= (response-code response) 400)
(raise-exception
(make-exception-with-message