aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-09-11 08:55:25 +0100
committerChristopher Baines <mail@cbaines.net>2023-09-12 13:11:00 +0100
commit318f4072fadf984c287d35258048003f6f26aebd (patch)
treec1b47f5b717ed65c196f6072584cad8453c11b80 /scripts
parent500b14d65fe1a458aa34286572e1ddbf53249ddf (diff)
downloadnar-herder-318f4072fadf984c287d35258048003f6f26aebd.tar
nar-herder-318f4072fadf984c287d35258048003f6f26aebd.tar.gz
Use fibers for the recent changes removal thread
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nar-herder.in18
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/nar-herder.in b/scripts/nar-herder.in
index e9d3150..0736592 100644
--- a/scripts/nar-herder.in
+++ b/scripts/nar-herder.in
@@ -610,15 +610,6 @@
(log-msg 'INFO "dumping database...")
(dump-database database (assq-ref opts 'database-dump))))
- (start-recent-change-removal-and-database-dump-thread
- database
- (let ((filename (assq-ref opts 'database-dump)))
- (if (string=? filename "disabled")
- #f
- filename))
- (* 24 3600) ; 24 hours
- (assq-ref opts 'recent-changes-limit))
-
(let ((finished? (make-condition)))
(call-with-new-thread
(lambda ()
@@ -629,6 +620,15 @@
(run-fibers
(lambda ()
+ (start-recent-change-removal-and-database-dump-fiber
+ database
+ (let ((filename (assq-ref opts 'database-dump)))
+ (if (string=? filename "disabled")
+ #f
+ filename))
+ (* 24 3600) ; 24 hours
+ (assq-ref opts 'recent-changes-limit))
+
(and=> (assq-ref opts 'mirror)
(lambda (mirror)
(start-fetch-changes-fiber database