guix-commits
[Top][All Lists]
Advanced

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

01/03: services: web: Spread mcron jobs over time to avoid peaks.


From: Ludovic Courtès
Subject: 01/03: services: web: Spread mcron jobs over time to avoid peaks.
Date: Thu, 28 Oct 2021 11:22:39 -0400 (EDT)

civodul pushed a commit to branch master
in repository maintenance.

commit f861820f3c355d0d0f73d5713c5b8873cf0a2d90
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Oct 26 11:39:21 2021 +0200

    services: web: Spread mcron jobs over time to avoid peaks.
    
    * hydra/modules/sysadmin/web.scm (static-web-site-mcron-jobs): Make
    minutes non-zero.
---
 hydra/modules/sysadmin/web.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hydra/modules/sysadmin/web.scm b/hydra/modules/sysadmin/web.scm
index bc1f078..abac188 100644
--- a/hydra/modules/sysadmin/web.scm
+++ b/hydra/modules/sysadmin/web.scm
@@ -153,8 +153,10 @@ that's built with Haunt or similar."
                            (basename
                             (static-web-site-configuration-directory 
config)))))
 
-  (list #~(job '(next-minute '(0)) #$update
-               #:user "static-web-site")))
+  ;; Spread web site updates over the hour to avoid I/O load peaks.
+  (let ((minutes (hash (static-web-site-configuration-git-url config) 60)))
+    (list #~(job '(next-minute '(#$minutes)) #$update
+                 #:user "static-web-site"))))
 
 (define (static-web-site-activation config)
   (with-imported-modules '((guix build utils))



reply via email to

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