Fixed #758: sphinx index watcher

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO
2018-03-18 13:54:13 +01:00
parent c918ad2a66
commit c12a876e59
9 changed files with 28 additions and 9 deletions

View File

@ -44,6 +44,7 @@ install:
$(INSTALL) -m 0755 $(srcdir)/purge.sh $(DESTDIR)$(libexecdir)/piler
$(INSTALL) -m 0755 $(srcdir)/pilerpurge.py $(DESTDIR)$(libexecdir)/piler
$(INSTALL) -m 0755 $(srcdir)/postinstall.sh $(DESTDIR)$(libexecdir)/piler
$(INSTALL) -m 0755 $(srcdir)/watch_sphinx_main_index.sh $(DESTDIR)$(libexecdir)/piler
$(INSTALL) -m 0755 $(srcdir)/db-mysql.sql $(DESTDIR)$(datarootdir)/piler
$(INSTALL) -m 0755 $(srcdir)/db-mysql-root.sql.in $(DESTDIR)$(datarootdir)/piler

View File

@ -277,7 +277,7 @@ make_cron_entries() {
echo "### PILERSTART" >> "$CRON_TMP"
echo "5,35 * * * * ${LIBEXECDIR}/piler/indexer.delta.sh" >> "$CRON_TMP"
echo "30 2 * * * ${LIBEXECDIR}/piler/indexer.main.sh" >> "$CRON_TMP"
echo "15,45 * * * * ${LIBEXECDIR}/piler/indexer.attachment.sh" >> "$CRON_TMP"
echo "3 * * * * ${LIBEXECDIR}/watch_sphinx_main_index.sh" >> "$CRON_TMP"
echo "*/15 * * * * ${INDEXER} --quiet tag1 --rotate --config ${SYSCONFDIR}/piler/sphinx.conf" >> "$CRON_TMP"
echo "*/15 * * * * ${INDEXER} --quiet note1 --rotate --config ${SYSCONFDIR}/piler/sphinx.conf" >> "$CRON_TMP"
echo "30 6 * * * /usr/bin/php ${LIBEXECDIR}/piler/generate_stats.php --webui ${DOCROOT} >/dev/null" >> "$CRON_TMP"

View File

@ -0,0 +1,3 @@
#!/bin/bash
find /var/piler/sphinx/ -type f -name main\*.spd -printf "%TY%Tm%Td %s\\n" | sort -r | head -1 | cut -f2 -d ' ' > /var/piler/stat/main_index_size