From 75c0cb3c1d9d1327a0c1bba2d5e1cd282780fbbf Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 15 Mar 2024 12:07:10 +0000 Subject: Update metrics while removing nars Rather than waiting until the end. --- nar-herder/storage.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nar-herder/storage.scm b/nar-herder/storage.scm index f8fde12..c1db3f5 100644 --- a/nar-herder/storage.scm +++ b/nar-herder/storage.scm @@ -448,6 +448,11 @@ When VERIFY-CERTIFICATE? is true, verify HTTPS server certificates." (uri-decode (assq-ref nar 'url))) + (update-nar-files-metric + metrics-registry + '() + #:removed-count 1) + (let ((storage-size-estimate (- storage-size (assq-ref nar 'size)))) @@ -460,11 +465,9 @@ When VERIFY-CERTIFICATE? is true, verify HTTPS server certificates." (match result ((storage-size . removed-count) - (update-nar-files-metric metrics-registry - nar-file-counts - #:removed-count removed-count))) - (log-msg 'INFO "finished looking for nars to remove")))) + (log-msg 'INFO "finished looking for nars to remove, removed " + removed-count " files")))))) (when (null? nar-removal-criteria) (error "must be some removal criteria")) -- cgit v1.2.3