From 91089b5dd0f2d6a802fc4f329f19f012bb7fb2c2 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 14 Oct 2022 13:50:12 +0100 Subject: Add more logging around file uploads --- guix-build-coordinator/agent-messaging/http.scm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'guix-build-coordinator/agent-messaging/http.scm') 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 -- cgit v1.2.3