Browse Source

hack: index update in separate dir

master
René Wagner 9 months ago
parent
commit
f5ce631246
  1. 6
      infra/gus-crawl.service
  2. 8
      infra/gus-crawl.timer
  3. 8
      infra/gus-index.service
  4. 2
      infra/update_index.sh
  5. 2
      serve/templates/about.gmi

6
infra/gus-crawl.service

@ -1,4 +1,4 @@
# /etc/systemd/system/gus-crawl.service
# /etc/systemd/system/gus.service
[Unit]
Description=Gemini Universal Search - Crawler
@ -7,7 +7,7 @@ Description=Gemini Universal Search - Crawler
User=gus
Group=gus
Type=oneshot
WorkingDirectory=/home/gus/code/gus
WorkingDirectory=/home/gus/
Environment="PYTHONUNBUFFERED=1"
ExecStart=/home/gus/.poetry/bin/poetry run crawl
ExecStopPost=systemctl start gus-index --no-block
ExecStopPost=sudo systemctl start gus-index --no-block

8
infra/gus-crawl.timer

@ -1,12 +1,12 @@
[Unit]
Description=Gemini Universal Search - Crawler Timer
Description=
ConditionVirtualization=!container
[Timer]
OnCalendar=Sat 18:00:00
AccuracySec=1h
OnCalendar=*-*-1/3 08:00:00
AccuracySec=15m
Persistent=true
RandomizedDelaySec=6000
RandomizedDelaySec=600
[Install]
WantedBy=timers.target

8
infra/gus-index.service

@ -1,4 +1,4 @@
# /etc/systemd/system/gus-index.service
# /etc/systemd/system/gus.service
[Unit]
Description=Gemini Universal Search - Indexer
@ -7,7 +7,7 @@ Description=Gemini Universal Search - Indexer
User=gus
Group=gus
Type=oneshot
WorkingDirectory=/home/gus/code/gus
WorkingDirectory=/home/gus
Environment="PYTHONUNBUFFERED=1"
ExecStart=/home/gus/.poetry/bin/poetry run build_index
ExecStopPost=systemctl restart gus
ExecStart=/bin/bash -c /home/gus/infra/update_index.sh
ExecStopPost=sudo systemctl restart gus

2
infra/update_index.sh

@ -1,5 +1,5 @@
cp -r /home/gus/index /home/gus/index.new
/home/gus/.poetry/bin/poetry run build_index
/home/gus/.poetry/bin/poetry run build_index -d
rm -rf /home/gus/index.old
mv /home/gus/index /home/gus/index.old
mv /home/gus/index.new /home/gus/index

2
serve/templates/about.gmi

@ -13,7 +13,7 @@ geminispace.info is NOT a fork, all changes in regard to crawling, indexing and
### index updates
Index updates run currently three times a week and happen completely unattended:
every sunday, tuesday and thursday starting around 01:00 UTC.
every sunday and wednesday starting around 07:00 UTC.
### contact the admin(s)

Loading…
Cancel
Save