mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 22:50:23 -05:00
publish: Avoid 'valid-path?' RPC for non-existent items.
* guix/scripts/publish.scm (render-narinfo/cached): Call 'file-exists?' before calling 'valid-path?'. This makes the 404 path slightly faster.
This commit is contained in:
parent
35eb77b09d
commit
deac674ab4
1 changed files with 2 additions and 1 deletions
|
@ -417,7 +417,8 @@ (define (delete-entry narinfo)
|
|||
(display (call-with-input-file cached
|
||||
read-string)
|
||||
port))))
|
||||
((valid-path? store item)
|
||||
((and (file-exists? item) ;cheaper than the 'valid-path?' RPC
|
||||
(valid-path? store item))
|
||||
;; Nothing in cache: bake the narinfo and nar in the background and
|
||||
;; return 404.
|
||||
(eventually pool
|
||||
|
|
Loading…
Reference in a new issue