[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: substitutes: lookup-narinfos: Return the number of requests made.
From: |
guix-commits |
Subject: |
01/02: substitutes: lookup-narinfos: Return the number of requests made. |
Date: |
Wed, 17 Mar 2021 17:55:52 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository guix.
commit c5ab78f90b111839508d0ab10c0e5ac2038002ca
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Mon Mar 15 14:06:27 2021 +0000
substitutes: lookup-narinfos: Return the number of requests made.
As an additional value, in addition to the narinfos. This value is useful
in
the weather script for reporting how many requests to the substitute server
were made.
* guix/substitutes.scm (lookup-narinfos): Additionally return the number of
requests made.
---
guix/substitutes.scm | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/guix/substitutes.scm b/guix/substitutes.scm
index ef78013..08f8c24 100644
--- a/guix/substitutes.scm
+++ b/guix/substitutes.scm
@@ -310,13 +310,14 @@ information is available locally."
'()
'()
paths)))
- (if (null? missing)
- cached
- (let ((missing (fetch-narinfos cache missing
- #:open-connection open-connection
- #:make-progress-reporter
- make-progress-reporter)))
- (append cached (or missing '()))))))
+ (values (if (null? missing)
+ cached
+ (let ((missing (fetch-narinfos cache missing
+ #:open-connection
open-connection
+ #:make-progress-reporter
+ make-progress-reporter)))
+ (append cached (or missing '()))))
+ (length missing))))
(define* (lookup-narinfos/diverse caches paths authorized?
#:key (open-connection