commit 1dac97f01e9c7260cf2ef84ab4080a4835c86c63
parent 2ebc1a844a7b569c8df6a402c3ea9c4b44be701b
Author: René Wagner <rwagner@rw-net.de>
Date: Mon, 8 Mar 2021 18:59:55 +0100
workaround for "index update blocks searches"
Diffstat:
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/gus/build_index.py b/gus/build_index.py
@@ -97,7 +97,8 @@ def invalidate_recent_results(index, invalidation_window):
def build_index(should_run_destructive=False, invalidation_window=0):
- index_dir = constants.INDEX_DIR_NEW if should_run_destructive else constants.INDEX_DIR
+ #index_dir = constants.INDEX_DIR_NEW if should_run_destructive else constants.INDEX_DIR
+ index_dir = constants.INDEX_DIR_NEW
db = init_db(index_dir + "/gus.sqlite")
index = search.Index(index_dir, should_run_destructive)
diff --git a/infra/update_index.sh b/infra/update_index.sh
@@ -0,0 +1,6 @@
+cp -r /home/gus/index /home/gus/index.new
+/home/gus/.poetry/bin/poetry run build_index
+rm -rf /home/gus/index.old
+mv /home/gus/index /home/gus/index.old
+mv /home/gus/index.new /home/gus/index
+sudo systemctl restart gus