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
|
@ -417,7 +417,8 @@ requested using POOL."
|
|||
(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 New Issue