aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-07-12 17:45:32 +0300
committerBonfaceKilz2024-07-12 17:58:15 +0300
commitbb82331010954863998ecc615a85dda348f18c85 (patch)
treedcf0ea423aa58b8ca01861440ba3ef077514a9eb /scripts
parentb8a9d43e6f0faca095b99219bea166a007537712 (diff)
downloadgenenetwork3-bb82331010954863998ecc615a85dda348f18c85.tar.gz
Use correct ttl-dir path when generating checksums.
* scripts/index-genenetwork (is_data_modified): Provide directory instead of specific ttl file. (create_xapian_index): Ditto. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/index-genenetwork4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/index-genenetwork b/scripts/index-genenetwork
index c13c933..8e16543 100755
--- a/scripts/index-genenetwork
+++ b/scripts/index-genenetwork
@@ -529,7 +529,7 @@ def is_data_modified(xapian_directory: str,
])
# Return a zero exit status code when the data has changed;
# otherwise exit with a 1 exit status code.
- generif = pathlib.Path("/var/lib/data/generif-metadata.ttl")
+ generif = pathlib.Path("/var/lib/data/")
if (db.get_metadata("generif-checksum").decode() == hash_rdf_graph(generif) and
db.get_metadata("checksums").decode() == checksums):
sys.exit(1)
@@ -587,7 +587,7 @@ def create_xapian_index(xapian_directory: str, sql_uri: str,
logging.info("Writing generif checksums into index")
db.set_metadata(
"generif-checksum",
- hash_rdf_graph(pathlib.Path("/var/lib/data/generif-metadata.ttl")).encode())
+ hash_rdf_graph(pathlib.Path("/var/lib/data/")).encode())
for child in combined_index.iterdir():
shutil.move(child, xapian_directory)
logging.info("Index built")