guix-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Ludovic Courtès
Date: Fri, 22 Dec 2023 11:52:47 -0500 (EST)

branch: master
commit a700359bf1a9a5dd8dd1dbe0a72e8a30162be6f7
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Dec 22 16:46:13 2023 +0100

    notification: Notification fiber polls less frequently.
    
    This potentially reduces database contention when running ‘cuirass
    remote-server’.
    
    * src/cuirass/notification.scm (spawn-notification-fiber): Sleep for one
    minute, not one second.
---
 src/cuirass/notification.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/cuirass/notification.scm b/src/cuirass/notification.scm
index a21db8e..4c2e261 100644
--- a/src/cuirass/notification.scm
+++ b/src/cuirass/notification.scm
@@ -155,7 +155,9 @@ the detailed information about this build here: ~a."
                    args)))))
 
 (define (spawn-notification-fiber)
-  "Start a thread sending build notifications."
+  "Start a fiber sending build notifications."
+  ;; TODO: Turn it into an actor that waits for incoming messages instead
+  ;; of polling.
   (spawn-fiber
    (lambda ()
      (let loop ()
@@ -172,5 +174,5 @@ the detailed information about this build here: ~a."
            ((mastodon? notif)
             (send-mastodon build))))
          (#f #f))
-       ((@ (fibers) sleep) 1)
+       ((@ (fibers) sleep) 60)
        (loop)))))



reply via email to

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