summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-10-30 12:31:18 +0100
committerLudovic Courtès <ludo@gnu.org>2020-10-30 12:31:18 +0100
commit2b2ab7796ac186d88060793b8873fc0e21462758 (patch)
tree3e6ecb3fd21338fc6f84342536ef8de299413b28 /gnu/services
parentd128a836e47aa39a57e06c293fae0dd336eab980 (diff)
services: guix-publish: Add 'cache-bypass-threshold' field.
This is a followup to ecaa102a58ad3ab0b42e04a3d10d7c761c05ec98. * gnu/services/base.scm (<guix-publish-configuration>)[cache-bypass-threshold]: New field. (guix-publish-shepherd-service): Honor it.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/base.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 07d9089b0a..f1298c3776 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1740,6 +1740,8 @@ proxy of 'guix-daemon'...~%")
(default "nar"))
(cache guix-publish-configuration-cache ;#f | string
(default #f))
+ (cache-bypass-threshold guix-publish-configuration-cache-bypass-threshold
+ (default (* 10 (expt 2 20)))) ;integer
(workers guix-publish-configuration-workers ;#f | integer
(default #f))
(ttl guix-publish-configuration-ttl ;#f | integer
@@ -1774,7 +1776,7 @@ raise a deprecation warning if the 'compression-level' field was used."
lst))))
(match-record config <guix-publish-configuration>
- (guix port host nar-path cache workers ttl)
+ (guix port host nar-path cache workers ttl cache-bypass-threshold)
(list (shepherd-service
(provision '(guix-publish))
(requirement '(guix-daemon))
@@ -1796,7 +1798,11 @@ raise a deprecation warning if the 'compression-level' field was used."
"s"))
#~())
#$@(if cache
- #~((string-append "--cache=" #$cache))
+ #~((string-append "--cache=" #$cache)
+ #$(string-append
+ "--cache-bypass-threshold="
+ (number->string
+ cache-bypass-threshold)))
#~()))
;; Make sure we run in a UTF-8 locale so we can produce