Browse Source

workaround for "index update blocks searches"

master
René Wagner 7 months ago
parent
commit
1dac97f01e
  1. 3
      gus/build_index.py
  2. 6
      infra/update_index.sh

3
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)

6
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
Loading…
Cancel
Save