From becef6838d751640ab2b89794e113987dcd23572 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 5 Jul 2024 09:44:23 -0500 Subject: Extend the genenetwork-service-type with the mcron indexer service Add the scheduled indexer service to the genenetwork-service-type. This will run the indexer script every hour. --- genenetwork/services/genenetwork.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'genenetwork/services') diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm index 6c08703..5dd7b6b 100644 --- a/genenetwork/services/genenetwork.scm +++ b/genenetwork/services/genenetwork.scm @@ -467,6 +467,12 @@ a @code{} record." (number->string gn-auth-port) ";") "proxy_set_header Host $host;"))))))))) +(define (genenetwork-mcron-jobs config) + (list #~(job '(next-hour) + #$(program-file "build-xapian-index-cron-gexp" + (build-xapian-index-cron-gexp config)) + #:user "root"))) + (define genenetwork-service-type (service-type (name 'genenetwork) @@ -479,7 +485,8 @@ a @code{} record." (service-extension gunicorn-service-type genenetwork-gunicorn-apps) (service-extension forge-nginx-service-type - genenetwork-nginx-server-blocks))) + genenetwork-nginx-server-blocks) + (service-extension mcron-service-type genenetwork-mcron-jobs))) (default-value (genenetwork-configuration)))) (define (gn-uploader-activation config) -- cgit v1.2.3