about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-07-05 09:44:23 -0500
committerFrederick Muriuki Muriithi2024-07-12 11:29:01 -0500
commitbecef6838d751640ab2b89794e113987dcd23572 (patch)
tree7e6dee793bb51c54651885e059d884134346fe35
parentb03f187d92258a92a1e60686e1ec45c21ab995d4 (diff)
downloadgn-machines-becef6838d751640ab2b89794e113987dcd23572.tar.gz
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.
-rw-r--r--genenetwork/services/genenetwork.scm9
-rw-r--r--uploader.scm2
2 files changed, 9 insertions, 2 deletions
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{<genenetwork-configuration>} 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{<genenetwork-configuration>} 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)
diff --git a/uploader.scm b/uploader.scm
index 4120730..5b60de9 100644
--- a/uploader.scm
+++ b/uploader.scm
@@ -64,7 +64,7 @@
                              (auth-db "/export/data/genenetwork-sqlite/auth.db")
                              (xapian-db "/export/data/genenetwork-xapian")
                              (genotype-files "/export/data/genenetwork/genotype_files")
-                             (sparql-endpoint "http://localhost:10892/sparql")
+                             (sparql-endpoint "http://localhost:10893/sparql")
                              (gn3-data-directory "/export/data/uploader/genenetwork3")
                              (gn2-secrets "/etc/genenetwork/genenetwork2")
                              (gn3-secrets "/etc/genenetwork/genenetwork3/gn3-secrets.py")