3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

services: cuirass-remote-worker: Rotate logs.

* gnu/services/cuirass.scm (cuirass-remote-worker-log-rotations): New
procedure.
(cuirass-remote-worker-service-type): Use it.
This commit is contained in:
Ludovic Courtès 2022-12-07 22:29:35 +01:00
parent 40153fe033
commit ce1f5ff6cf
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -394,12 +394,21 @@ CONFIG."
#:log-file #$log-file))
(stop #~(make-kill-destructor))))))
(define (cuirass-remote-worker-log-rotations config)
"Return the list of log rotations that corresponds to CONFIG."
(list (log-rotation
(files (list (cuirass-remote-worker-log-file config)))
(frequency 'weekly)
(options `("rotate 4" ;don't keep too many of them
,@%default-log-rotation-options)))))
(define cuirass-remote-worker-service-type
(service-type
(name 'cuirass-remote-worker)
(extensions
(list
(service-extension shepherd-root-service-type
cuirass-remote-worker-shepherd-service)))
(list (service-extension shepherd-root-service-type
cuirass-remote-worker-shepherd-service)
(service-extension rottlog-service-type
cuirass-remote-worker-log-rotations)))
(description
"Run the Cuirass remote build worker service.")))