scripts: substitute: Cache connection when looking for narinfos.
The process-substitution procedure is opening two distinct connections. The first one when looking for narinfo by calling lookup-narinfo and the other one when fetching nar files. Cache the connection when looking for narinfos so that process-substitution only opens one connection. * guix/scripts/substitute.scm (lookup-narinfo): Cache connection by using open-connection-for-uri/cached.
This commit is contained in:
parent
82b0e27de1
commit
a068ed6a5f
1 changed files with 3 additions and 1 deletions
|
@ -163,7 +163,9 @@ if file doesn't exist, and the narinfo otherwise."
|
||||||
(define (lookup-narinfo caches path authorized?)
|
(define (lookup-narinfo caches path authorized?)
|
||||||
"Return the narinfo for PATH in CACHES, or #f when no substitute for PATH
|
"Return the narinfo for PATH in CACHES, or #f when no substitute for PATH
|
||||||
was found."
|
was found."
|
||||||
(match (lookup-narinfos/diverse caches (list path) authorized?)
|
(match (lookup-narinfos/diverse
|
||||||
|
caches (list path) authorized?
|
||||||
|
#:open-connection open-connection-for-uri/cached)
|
||||||
((answer) answer)
|
((answer) answer)
|
||||||
(_ #f)))
|
(_ #f)))
|
||||||
|
|
||||||
|
|
Reference in a new issue