diff options
author | Arun Isaac | 2022-10-26 14:21:55 +0530 |
---|---|---|
committer | Arun Isaac | 2022-10-26 14:21:55 +0530 |
commit | 6a9db0c1734a22e792f2204c029810ca1cea7f86 (patch) | |
tree | c3c4062d368a1302179f174e8ba59f65686febe8 /gn3/settings.py | |
parent | 03852be20b7e554a7b228e08ab369bfba51fbde2 (diff) | |
download | genenetwork3-6a9db0c1734a22e792f2204c029810ca1cea7f86.tar.gz |
Add xapian database connection context manager.
* gn3/settings.py (XAPIAN_DB_PATH): New variable.
* gn3/db_utils.py: Import xapian and XAPIAN_DB_PATH from gn3.settings.
(xapian_database): New function.
Diffstat (limited to 'gn3/settings.py')
-rw-r--r-- | gn3/settings.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gn3/settings.py b/gn3/settings.py index 5bb5f17..86bdd95 100644 --- a/gn3/settings.py +++ b/gn3/settings.py @@ -37,6 +37,9 @@ CORRELATION_COMMAND = f"{os.environ.get('GN2_PROFILE')}/bin/correlation_rust" GENOTYPE_FILES = os.environ.get( "GENOTYPE_FILES", f"{os.environ.get('HOME')}/genotype_files/genotype") +# Xapian index +XAPIAN_DB_PATH = "xapian" + # CROSS-ORIGIN SETUP def parse_env_cors(default): """Parse comma-separated configuration into list of strings.""" |