aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nar-herder.in18
1 files changed, 13 insertions, 5 deletions
diff --git a/scripts/nar-herder.in b/scripts/nar-herder.in
index 8ade7fb..d1f95d1 100644
--- a/scripts/nar-herder.in
+++ b/scripts/nar-herder.in
@@ -211,8 +211,12 @@
(append %base-option-defaults
%import-options-defaults)
rest))
+ (metrics-registry
+ (make-metrics-registry #:namespace
+ "narherder"))
(database (setup-database
- (assq-ref opts 'database))))
+ (assq-ref opts 'database)
+ metrics-registry)))
(let* ((narinfos
(append-map
(lambda (file-or-dir)
@@ -258,8 +262,12 @@
(let* ((opts (parse-options %base-options
%base-option-defaults
rest))
+ (metrics-registry
+ (make-metrics-registry #:namespace
+ "narherder"))
(database (setup-database
- (assq-ref opts 'database)))
+ (assq-ref opts 'database)
+ metrics-registry))
(lgr (make <logger>))
(port-log (make <port-log>
#:port (current-output-port)
@@ -287,8 +295,7 @@
(remove-nar-files-by-hash
database
(assq-ref opts 'storage)
- (make-metrics-registry #:namespace
- "narherder")
+ metrics-registry
(store-path-hash-part store-path)))
(log-msg
'WARN "no --storage set, so just removing from the database"))
@@ -386,7 +393,8 @@
#f)
(download-database)))))
- (let ((database (setup-database (assq-ref opts 'database)))
+ (let ((database (setup-database (assq-ref opts 'database)
+ metrics-registry))
(canonical-storage (and=> (assq-ref opts 'storage)
canonicalize-path)))