aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-04-28 16:24:52 +0100
committerChristopher Baines <mail@cbaines.net>2024-04-28 16:24:52 +0100
commit71115bd073d58c48eb4a1d456ac4c89b262799ef (patch)
tree1acefd986ac2c1eccf21e432972e59c724c626a9
parentff68badd0782db46f7911886374e343abcb445b1 (diff)
downloadnar-herder-71115bd073d58c48eb4a1d456ac4c89b262799ef.tar
nar-herder-71115bd073d58c48eb4a1d456ac4c89b262799ef.tar.gz
Stop double counting new nar files
This is handled by listening for recent changes now.
-rw-r--r--nar-herder/mirror.scm19
1 files 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 "