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

* hydra/modules/sysadmin/web.scm (static-web-site-mcron-jobs): Make
minutes non-zero.
This commit is contained in:
Ludovic Courtès 2021-10-26 11:39:21 +02:00
parent 5c5341d42d
commit f861820f3c
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 4 additions and 2 deletions

View File

@ -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))