mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
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.
This commit is contained in:
parent
b48204259a
commit
c5ab78f90b
1 changed files with 8 additions and 7 deletions
|
@ -310,13 +310,14 @@ (define* (lookup-narinfos cache paths
|
|||
'()
|
||||
'()
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue