guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: services: cuirass-remote-worker: Rotate logs.


From: guix-commits
Subject: 01/03: services: cuirass-remote-worker: Rotate logs.
Date: Wed, 7 Dec 2022 17:44:51 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit ce1f5ff6cff2a3c820c4212ae8d4c4cfa5ae949c
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Dec 7 22:29:35 2022 +0100

    services: cuirass-remote-worker: Rotate logs.
    
    * gnu/services/cuirass.scm (cuirass-remote-worker-log-rotations): New
    procedure.
    (cuirass-remote-worker-service-type): Use it.
---
 gnu/services/cuirass.scm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index d7c6ab9877..43a1edcb34 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -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.")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]