guix-commits
[Top][All Lists]
Advanced

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

02/02: hydra: services: Add an mcron job to update the Goggles index.


From: Ludovic Courtès
Subject: 02/02: hydra: services: Add an mcron job to update the Goggles index.
Date: Fri, 26 Jun 2020 11:50:20 -0400 (EDT)

civodul pushed a commit to branch master
in repository maintenance.

commit 19520372a2410b9c300a243f34ab96e479f99ac1
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Jun 26 17:49:43 2020 +0200

    hydra: services: Add an mcron job to update the Goggles index.
    
    * hydra/modules/sysadmin/services.scm (goggles-mcron-jobs): New procedure.
    (goggles-service-type): Extend MCRON-SERVICE-TYPE.
---
 hydra/modules/sysadmin/services.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/hydra/modules/sysadmin/services.scm 
b/hydra/modules/sysadmin/services.scm
index 29b175e..cde2297 100644
--- a/hydra/modules/sysadmin/services.scm
+++ b/hydra/modules/sysadmin/services.scm
@@ -488,6 +488,11 @@
                                        (writable? #t)))))
            (stop #~(make-kill-destructor))))))
 
+(define (goggles-mcron-jobs goggles)
+  "Return mcron jobs to update the Xapian indexes by invoking GOGGLES."
+  (list #~(job '(next-minute '(0))
+               (string-append #$goggles " index"))))
+
 (define %goggles-accounts
   (list (user-account
          (name "goggles")
@@ -508,6 +513,8 @@
                                         (const %goggles-accounts))
                      (service-extension activation-service-type
                                         (const %goggles-activation))
+                     (service-extension mcron-service-type
+                                        goggles-mcron-jobs)
                      (service-extension shepherd-root-service-type
                                         goggles-shepherd-services)))
    (default-value goggles)



reply via email to

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