branch: main
commit 520b2fdbd96e953fc2d4b56e78e52a81fc11e2b7
Author: Romain GARBAGE <romain.garb...@inria.fr>
AuthorDate: Mon Feb 24 15:38:12 2025 +0100

    base: Add support for event logging in jobset-monitor.
    
    * src/cuirass/base.scm (jobset-monitor, spawn-jobset-monitor): Add support 
for
    event logging.
    
    Signed-off-by: Ludovic Courtès <l...@gnu.org>
---
 src/cuirass/base.scm | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm
index 3ef6c39..c3a0fb6 100644
--- a/src/cuirass/base.scm
+++ b/src/cuirass/base.scm
@@ -871,7 +871,7 @@ notification subscriptions."
 
 (define* (jobset-monitor channel spec
                          #:key (polling-period 60)
-                         update-service evaluator)
+                         update-service evaluator event-log)
   (define name (specification-name spec))
 
   (lambda ()
@@ -984,7 +984,8 @@ notification subscriptions."
 
 (define* (spawn-jobset-monitor spec
                                #:key (polling-period 60)
-                               update-service evaluator)
+                               update-service evaluator
+                               event-log)
   "Spawn an actor responsible for monitoring the jobset corresponding to SPEC,
 a <specification> record, and return it.  The actor will send messages to
 UPDATE-SERVICE anytime it needs Guix channels to be updated, at most every
@@ -993,7 +994,8 @@ POLLING-PERIOD seconds."
     (spawn-fiber (jobset-monitor channel spec
                                  #:update-service update-service
                                  #:evaluator evaluator
-                                 #:polling-period polling-period))
+                                 #:polling-period polling-period
+                                 #:event-log event-log))
     channel))
 
 
@@ -1042,7 +1044,8 @@ POLLING-PERIOD seconds."
                                                   #:update-service
                                                   update-service
                                                   #:evaluator evaluator
-                                                  #:polling-period period))
+                                                  #:polling-period period
+                                                  #:event-log event-log))
                    (name (specification-name spec)))
               (log-info "registering new jobset '~a'" name)
               (put-message event-log

Reply via email to