From 71115bd073d58c48eb4a1d456ac4c89b262799ef Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 28 Apr 2024 16:24:52 +0100 Subject: Stop double counting new nar files This is handled by listening for recent changes now. --- nar-herder/mirror.scm | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/nar-herder/mirror.scm b/nar-herder/mirror.scm index a784165..8aae845 100644 --- a/nar-herder/mirror.scm +++ b/nar-herder/mirror.scm @@ -120,23 +120,8 @@ narinfo #:change-datetime (assq-ref change-details - 'datetime)) - - (and=> (metrics-registry-fetch-metric metrics-registry - "nar_files_total") - (lambda (metric) - ;; Just update this metric if it - ;; exists, since if it does, it - ;; should be set to a value - (let ((new-files-count - (length (narinfo-uris narinfo)))) - (metric-increment - metric - #:by new-files-count - ;; TODO This should be - ;; checked, rather than - ;; assumed to be false - #:label-values '((stored . "false")))))))) + 'datetime)))) + ((string=? change "removal") (let ((store-path (assq-ref change-details 'data))) (log-msg 'INFO "processing removal change for " -- cgit v1.2.3