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)))
|
paths)))
|
||||||
(if (null? missing)
|
(values (if (null? missing)
|
||||||
cached
|
cached
|
||||||
(let ((missing (fetch-narinfos cache missing
|
(let ((missing (fetch-narinfos cache missing
|
||||||
#:open-connection open-connection
|
#:open-connection open-connection
|
||||||
#:make-progress-reporter
|
#:make-progress-reporter
|
||||||
make-progress-reporter)))
|
make-progress-reporter)))
|
||||||
(append cached (or missing '()))))))
|
(append cached (or missing '()))))
|
||||||
|
(length missing))))
|
||||||
|
|
||||||
(define* (lookup-narinfos/diverse caches paths authorized?
|
(define* (lookup-narinfos/diverse caches paths authorized?
|
||||||
#:key (open-connection
|
#:key (open-connection
|
||||||
|
|
Loading…
Reference in a new issue