diff options
author | Christopher Baines <mail@cbaines.net> | 2023-05-10 14:11:50 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-05-10 14:11:50 +0100 |
commit | b0e82fbea081f326ec7dd592fb49dc062e2b3d00 (patch) | |
tree | c4664b04c1861799b3ccb2a3683a1fe149c9daad /guix-build-coordinator | |
parent | 3f6473c0d296ed6efab1feebcacd76fc597bb6ef (diff) | |
download | build-coordinator-b0e82fbea081f326ec7dd592fb49dc062e2b3d00.tar build-coordinator-b0e82fbea081f326ec7dd592fb49dc062e2b3d00.tar.gz |
Tweak retrying for status update requests
Don't retry status updates many times, since the information will be more out
of date each time.
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r-- | guix-build-coordinator/agent-messaging/http.scm | 11 | ||||
-rw-r--r-- | guix-build-coordinator/agent.scm | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm index 96c67ec..9a2732d 100644 --- a/guix-build-coordinator/agent-messaging/http.scm +++ b/guix-build-coordinator/agent-messaging/http.scm @@ -126,7 +126,8 @@ interface path #:key method body (headers '()) - succeed-on-access-denied-retry?) + succeed-on-access-denied-retry? + retry-times) (define auth-value (string-append "Basic " @@ -196,7 +197,7 @@ (retry-on-error (lambda () (with-port-timeouts make-request)) - #:times 9 + #:times retry-times #:delay 10 #:ignore agent-error-from-coordinator?)) @@ -250,7 +251,8 @@ (apply (lambda* (status #:key 1min-load-average system-uptime (log default-log) - initial-status-update?) + initial-status-update? + (retry-times 1)) (coordinator-http-request log interface @@ -267,7 +269,8 @@ '()) ,@(if initial-status-update? `((initial_status_update . #t)) - '())))) + '())) + #:retry-times retry-times)) args)) (define-method (submit-output diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm index ab81b03..ce25588 100644 --- a/guix-build-coordinator/agent.scm +++ b/guix-build-coordinator/agent.scm @@ -492,7 +492,8 @@ (get-load-average #:period 1) #:system-uptime (get-uptime) #:initial-status-update? #t - #:log (build-log-procedure lgr)))) + #:log (build-log-procedure lgr) + #:retry-times 60))) (for-each (lambda (job-args) (process-job-with-queue job-args)) |