From d4623d50edac4a6e81f5986a91c2818f5fc4965d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 7 Nov 2018 11:47:39 +0100 Subject: base: Register GC roots for build results. Fixes . * src/cuirass/base.scm (%gc-root-directory, %gc-root-ttl): New variables. (gc-root-expiration-time, register-gc-root): New procedures. (handle-build-event)[gc-roots]: New procedure. Upon 'build-succeeded' events, call 'register-gc-root' and 'maybe-remove-expired-cache-entries'. * bin/cuirass.in (show-help, %options): Add '--ttl'. (main): Parameterize %GC-ROOT-TTL. Create %GC-ROOT-DIRECTORY. * doc/cuirass.texi (Invocation): Document '--ttl'. --- doc/cuirass.texi | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/cuirass.texi b/doc/cuirass.texi index 08ca832..ebb1fa5 100644 --- a/doc/cuirass.texi +++ b/doc/cuirass.texi @@ -203,6 +203,17 @@ build results. Since @code{cuirass} uses SQLite as a database engine, @var{database} must be a file name. If the file doesn't exist, it will be created. +@item --ttl=@var{duration} +Cuirass registers build results as garbage collector (GC) roots, thereby +preventing them from being deleted by the GC. The @option{--ttl} option +instructs it to keep those GC roots live for at least @var{duration}---e.g., +@code{1m} for one month, @code{2w} for two weeks, and so on. The default is +30 days. + +Those GC roots are typically stored in +@file{/var/guix/gcroots/per-user/@var{user}/cuirass}, where @var{user} is the +user under which Cuirass is running. + @item --port=@var{num} @itemx -p @var{num} Make the HTTP interface listen on port @var{num}. Use port 8080 by -- cgit v1.2.3