services: cuirass: Add 'ttl' configuration field.

* gnu/services/cuirass.scm (<cuirass-configuration>)[ttl]: New field.
(cuirass-shepherd-service): Honor it.
This commit is contained in:
Ludovic Courtès 2018-11-07 16:01:17 +01:00
parent 08759829cf
commit dcb45127e0
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 10 additions and 1 deletions

View File

@ -18672,6 +18672,11 @@ Cuirass jobs.
Location of sqlite database which contains the build results and previously Location of sqlite database which contains the build results and previously
added specifications. added specifications.
@item @code{ttl} (default: @code{(* 30 24 3600)})
Specifies the time-to-live (TTL) in seconds of garbage collector roots that
are registered for build results. This means that build results are protected
from garbage collection for at least @var{ttl} seconds.
@item @code{port} (default: @code{8081}) @item @code{port} (default: @code{8081})
Port number used by the HTTP server. Port number used by the HTTP server.

View File

@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org> ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
@ -54,6 +54,8 @@
(default "/var/log/cuirass.log")) (default "/var/log/cuirass.log"))
(cache-directory cuirass-configuration-cache-directory ;string (dir-name) (cache-directory cuirass-configuration-cache-directory ;string (dir-name)
(default "/var/cache/cuirass")) (default "/var/cache/cuirass"))
(ttl cuirass-configuration-ttl ;integer
(default (* 30 24 3600)))
(user cuirass-configuration-user ;string (user cuirass-configuration-user ;string
(default "cuirass")) (default "cuirass"))
(group cuirass-configuration-group ;string (group cuirass-configuration-group ;string
@ -86,6 +88,7 @@
(group (cuirass-configuration-group config)) (group (cuirass-configuration-group config))
(interval (cuirass-configuration-interval config)) (interval (cuirass-configuration-interval config))
(database (cuirass-configuration-database config)) (database (cuirass-configuration-database config))
(ttl (cuirass-configuration-ttl config))
(port (cuirass-configuration-port config)) (port (cuirass-configuration-port config))
(host (cuirass-configuration-host config)) (host (cuirass-configuration-host config))
(specs (cuirass-configuration-specifications config)) (specs (cuirass-configuration-specifications config))
@ -102,6 +105,7 @@
"--specifications" "--specifications"
#$(scheme-file "cuirass-specs.scm" specs) #$(scheme-file "cuirass-specs.scm" specs)
"--database" #$database "--database" #$database
"--ttl" #$(string-append (number->string ttl) "s")
"--port" #$(number->string port) "--port" #$(number->string port)
"--listen" #$host "--listen" #$host
"--interval" #$(number->string interval) "--interval" #$(number->string interval)