diff options
author | Christopher Baines <mail@cbaines.net> | 2021-05-28 15:08:30 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-05-28 15:08:30 +0100 |
commit | 81f1a14b8fa6b3dc59ae5ed9169126c847d71391 (patch) | |
tree | f99989732d157e90b9b072b640fbb01565d44d24 | |
parent | 102c9530da104d2612fbd19c8f374ee126eabd5d (diff) | |
download | build-coordinator-81f1a14b8fa6b3dc59ae5ed9169126c847d71391.tar build-coordinator-81f1a14b8fa6b3dc59ae5ed9169126c847d71391.tar.gz |
Improve retrying for missing log files
-rw-r--r-- | guix-build-coordinator/agent.scm | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm index ed2adb2..424d808 100644 --- a/guix-build-coordinator/agent.scm +++ b/guix-build-coordinator/agent.scm @@ -278,15 +278,20 @@ (define (agent-submit-log-file lgr coordinator-interface build-id derivation-name) - (retry-on-error - (lambda () - (let ((log-file (derivation-log-file derivation-name))) - (unless log-file - (raise-exception - (make-exception-with-message - (simple-format #f "log file missing for ~A (~A)" - derivation-name build-id)))) - + (let ((log-file + ;; TODO Not sure if retrying here is useful? + (retry-on-error + (lambda () + (let ((file (derivation-log-file derivation-name))) + (or file + (raise-exception + (make-exception-with-message + (simple-format #f "log file missing for ~A (~A)" + derivation-name build-id)))))) + #:times 3 + #:delay 3))) + (retry-on-error + (lambda () (log-msg lgr 'INFO build-id ": uploading log file " log-file) @@ -294,9 +299,9 @@ coordinator-interface build-id log-file - #:log (build-log-procedure lgr build-id)))) - #:times 12 - #:delay 10)) + #:log (build-log-procedure lgr build-id))) + #:times 12 + #:delay 10))) (define (pre-build-process lgr store |