From 39cf2280bb87a2f177b4cb8334c5eb7ad95a0d17 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 8 Feb 2023 14:48:25 +0100 Subject: Allow disabling dumping the database As this takes up quite a lot of space if the database is large. --- scripts/nar-herder.in | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/nar-herder.in b/scripts/nar-herder.in index 32b467d..7524308 100644 --- a/scripts/nar-herder.in +++ b/scripts/nar-herder.in @@ -568,13 +568,19 @@ #:cached-compression-workers (assq-ref opts 'cached-compression-workers))))) - (when (not (file-exists? (assq-ref opts 'database-dump))) - (log-msg 'INFO "dumping database...") - (dump-database database (assq-ref opts 'database-dump))) + (if (string=? (assq-ref opts 'database-dump) + "disabled") + (log-msg 'INFO "database dump disabled") + (when (not (file-exists? (assq-ref opts 'database-dump))) + (log-msg 'INFO "dumping database...") + (dump-database database (assq-ref opts 'database-dump)))) (start-recent-change-removal-and-database-dump-thread database - (assq-ref opts 'database-dump) + (let ((filename (assq-ref opts 'database-dump))) + (if (string=? filename "disabled") + #f + filename)) (* 24 3600) ; 24 hours (assq-ref opts 'recent-changes-limit)) -- cgit v1.2.3