diff options
author | Christopher Baines <mail@cbaines.net> | 2022-01-19 20:30:11 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2022-01-19 20:30:11 +0000 |
commit | 2db8bf7ad2324048bc5e301b4b29da6d2786bfc2 (patch) | |
tree | 55d8a41ab5eb07305024e38a175dedb3d98f62a3 /guix-build-coordinator | |
parent | fdb4db6621d944ff3aeada6550c2db65d2c9508e (diff) | |
download | build-coordinator-2db8bf7ad2324048bc5e301b4b29da6d2786bfc2.tar build-coordinator-2db8bf7ad2324048bc5e301b4b29da6d2786bfc2.tar.gz |
Tweak retrying code to not catch the exception on the last try
This might make it easier to see backtraces.
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r-- | guix-build-coordinator/utils.scm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm index 851ccd0..ea5e92a 100644 --- a/guix-build-coordinator/utils.scm +++ b/guix-build-coordinator/utils.scm @@ -599,15 +599,17 @@ References: ~a~%" times)) (apply values return-values)) ((#f . exn) - (if (>= attempt times) + (if (>= attempt + (- times 1)) (begin (simple-format (current-error-port) - "error: ~A:\n ~A,\n giving up after ~A attempts\n" + "error: ~A:\n ~A,\n attempt ~A of ~A, last retry in ~A\\n" f exn times) - (raise-exception exn)) + (sleep delay) + (f)) (begin (simple-format (current-error-port) |