From a52c7972bb933a84c4b51f46fff25328269e3864 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 12 Jul 2023 15:56:02 +0100 Subject: Retry fetching the initial state --- bffe/server.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'bffe') diff --git a/bffe/server.scm b/bffe/server.scm index 0699942..eafa9b5 100644 --- a/bffe/server.scm +++ b/bffe/server.scm @@ -47,7 +47,8 @@ #:use-module (guix-data-service web util) #:use-module ((guix-build-coordinator utils) #:select (with-time-logging get-gc-metrics-updater - call-with-delay-logging)) + call-with-delay-logging + retry-on-error)) #:use-module ((guix-build-coordinator utils fibers) #:select (run-server/patched call-with-sigint)) #:use-module (guix-build-coordinator client-communication) @@ -550,9 +551,13 @@ (run-fibers (lambda () (let ((initial-state-id - (assoc-ref - (get-state state-channel) - "state_id"))) + (retry-on-error + (lambda () + (assoc-ref + (get-state state-channel) + "state_id")) + #:times 6 + #:delay 10))) (simple-format #t "Starting from state ~A\n" initial-state-id) -- cgit v1.2.3