From 519f0c6f67f852ec89b3c9ef87395800452ba61a Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 9 Mar 2023 09:39:47 +0000 Subject: [PATCH] Defer backfilling derivation distribution counts until later After the migrations have run. --- scripts/guix-data-service.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/guix-data-service.in b/scripts/guix-data-service.in index d8b9b5a..23886b7 100644 --- a/scripts/guix-data-service.in +++ b/scripts/guix-data-service.in @@ -218,13 +218,6 @@ (pid-file (assq-ref opts 'pid-file))) - (call-with-new-thread - (lambda () - (with-postgresql-connection-per-thread - "backfill" - (lambda () - (backfill-guix-revision-package-derivation-distribution-counts))))) - (when pid-file (call-with-output-file pid-file (lambda (port) @@ -283,6 +276,13 @@ (atomic-box-set! startup-completed #t))) + (call-with-new-thread + (lambda () + (with-postgresql-connection-per-thread + "backfill" + (lambda () + (backfill-guix-revision-package-derivation-distribution-counts))))) + (start-substitute-query-thread) (join-thread server-thread))))