aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-07-12 15:56:02 +0100
committerChristopher Baines <mail@cbaines.net>2023-07-12 15:56:02 +0100
commita52c7972bb933a84c4b51f46fff25328269e3864 (patch)
tree2c20fd1c92fdb696f417fd7e40e8a388ff6df2b1
parent258f6542202cbb50b18d87f3a890ba80d4586980 (diff)
downloadbffe-a52c7972bb933a84c4b51f46fff25328269e3864.tar
bffe-a52c7972bb933a84c4b51f46fff25328269e3864.tar.gz
Retry fetching the initial state
-rw-r--r--bffe/server.scm13
1 files changed, 9 insertions, 4 deletions
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)