From 5ccd6cbbdf5fc41e43a491d3414c1663e1fba64d Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 23 Nov 2023 10:31:15 +0000 Subject: Don't allow the mirror and removal channel to be unspecified As this is truthy. --- nar-herder/server.scm | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/nar-herder/server.scm b/nar-herder/server.scm index 7aa4115..9153055 100644 --- a/nar-herder/server.scm +++ b/nar-herder/server.scm @@ -698,12 +698,13 @@ mirror metrics-registry) - (when (assq-ref opts 'storage) - (start-mirroring-fiber database - mirror - (assq-ref opts 'storage-limit) - canonical-storage - metrics-registry))))) + (if (assq-ref opts 'storage) + (start-mirroring-fiber database + mirror + (assq-ref opts 'storage-limit) + canonical-storage + metrics-registry) + #f)))) (removal-channel (let ((nar-removal-criteria (filter-map @@ -713,14 +714,15 @@ val #f))) opts))) - (when (and (assq-ref opts 'storage) - (number? (assq-ref opts 'storage-limit)) - (not (null? nar-removal-criteria))) - (start-nar-removal-fiber database - canonical-storage - (assq-ref opts 'storage-limit) - metrics-registry - nar-removal-criteria)))) + (if (and (assq-ref opts 'storage) + (number? (assq-ref opts 'storage-limit)) + (not (null? nar-removal-criteria))) + (start-nar-removal-fiber database + canonical-storage + (assq-ref opts 'storage-limit) + metrics-registry + nar-removal-criteria) + #f))) (addition-channel (make-channel))) (spawn-fiber -- cgit v1.2.3