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.master
parent
35eb77b09d
commit
deac674ab4
|
@ -417,7 +417,8 @@ requested using POOL."
|
||||||
(display (call-with-input-file cached
|
(display (call-with-input-file cached
|
||||||
read-string)
|
read-string)
|
||||||
port))))
|
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
|
;; Nothing in cache: bake the narinfo and nar in the background and
|
||||||
;; return 404.
|
;; return 404.
|
||||||
(eventually pool
|
(eventually pool
|
||||||
|
|
Loading…
Reference in New Issue