[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#77585] [PATCH] services: mumi: Add Debbugs rsync as shepherd timer.
From: |
Ludovic Courtès |
Subject: |
[bug#77585] [PATCH] services: mumi: Add Debbugs rsync as shepherd timer. |
Date: |
Sun, 06 Apr 2025 22:23:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi Arun,
Arun Isaac <arunisaac@systemreboot.net> skribis:
> * gnu/services/web.scm (<mumi-configuration>)[data-directory, rsync-remote,
> rsync-flags]: New fields.
> (%mumi-worker-log): Delete variable.
> (%mumi-rsync-and-index-log): New variable.
> (mumi-rsync-and-index-gexp): New function.
> (mumi-shepherd-services): Remove mumi-worker service. Add mumi-rsync-and-index
> service.
> (mumi-service-type): Remove default value.
> * doc/guix.texi (Web Services)[mumi]: Document data-directory, rsync-remote
> and rsync-flags fields.
>
> Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
[...]
> +(define (mumi-rsync-and-index-gexp config)
As a matter of style, I would return a program
(‘mumi-rsync-and-index-program’) rather than a gexp; I find it clearer
and more robust (the gexp leaves it up to the caller to insert it in the
right context).
> + (start #~(make-timer-constructor
> + (calendar-event)
You can add a margin comment say “every minute”, for clarity.
> + (command
> + (program-file "mumi-rsync-and-index"
> + (mumi-rsync-and-index-gexp config)))
I think you’re missing #$ before (mumi-rsync-and-index-gexp config).
> + #:log-file #$%mumi-rsync-and-index-log
> + #:max-duration (* 60 60)
> + #:wait-for-termination? #t))
Every minute is a lot, especially since it may take several seconds to
establish the rsync-over-ssh connection. It’s mitigated by the use of
#:wait-for-termination? but still sounds fairly aggressive to me.
(It would be ideal if the Debbugs instance could somehow notify mumi.)
Perhaps mention the polling frequency in the manual?
Thanks,
Ludo’.