publish: Do not bake the same item several times.
Before this patch, there was a possibility that we'd queue several baking tasks for the same item. The first one would bake the item but subsequent tasks wouldn't check whether the item had been baked in the meantime and would re-bake it. * guix/scripts/publish.scm (render-narinfo/cached): Don't call 'bake-narinfo+nar' when (file-exists? cached).master
parent
ae54843433
commit
737397355c
|
@ -425,11 +425,13 @@ requested using POOL."
|
||||||
;; return 404.
|
;; return 404.
|
||||||
(eventually pool
|
(eventually pool
|
||||||
(single-baker item
|
(single-baker item
|
||||||
|
;; Check whether CACHED has been produced in the meantime.
|
||||||
|
(unless (file-exists? cached)
|
||||||
;; (format #t "baking ~s~%" item)
|
;; (format #t "baking ~s~%" item)
|
||||||
(bake-narinfo+nar cache item
|
(bake-narinfo+nar cache item
|
||||||
#:ttl ttl
|
#:ttl ttl
|
||||||
#:compression compression
|
#:compression compression
|
||||||
#:nar-path nar-path))
|
#:nar-path nar-path)))
|
||||||
|
|
||||||
(when ttl
|
(when ttl
|
||||||
(single-baker 'cache-cleanup
|
(single-baker 'cache-cleanup
|
||||||
|
|
Reference in New Issue