indexer job fixes

This commit is contained in:
SJ 2013-07-09 10:30:48 +02:00
parent 7e65be8ca7
commit 19efbef715
2 changed files with 5 additions and 7 deletions

View File

@ -19,8 +19,6 @@ trap finish EXIT
echo "INDEXER INFO: indexing delta1 started" | logger -p $PRIORITY echo "INDEXER INFO: indexing delta1 started" | logger -p $PRIORITY
5,35 2-23 * * * /usr/local/bin/indexer --quiet delta1 --rotate && sleep 2 && /usr/local/bin/indexer --quiet --merge dailydelta1 delta1 --merge-dst-range deleted 0 0 --rotate
$INDEXER --quiet delta1 --rotate $INDEXER --quiet delta1 --rotate
echo "INDEXER INFO: indexing delta1 finished" | logger -p $PRIORITY echo "INDEXER INFO: indexing delta1 finished" | logger -p $PRIORITY

View File

@ -5,7 +5,7 @@ MAINTMPFILE=/var/run/piler/main.indexer.tmp
INDEXER=`which indexer` INDEXER=`which indexer`
PRIORITY=mail.error PRIORITY=mail.error
if [ -f $MAINTMPFILE ]; then echo "ERROR: indexer merging to main index is already running. It started at "`cat $MAINTMPFILE` | logger -p $PRIORITY ; exit 1; fi if [ -f $MAINTMPFILE ]; then echo "INDEXER ERROR: indexer merging to main index is already running. It started at "`cat $MAINTMPFILE` | logger -p $PRIORITY ; exit 1; fi
date > $MAINTMPFILE date > $MAINTMPFILE
@ -15,17 +15,17 @@ function finish {
trap finish EXIT trap finish EXIT
echo "INFO: merging to main started" | logger -p $PRIORITY echo "INDEXER INFO: merging to main started" | logger -p $PRIORITY
$INDEXER --quiet --merge main1 dailydelta1 --merge-dst-range deleted 0 0 --rotate $INDEXER --quiet --merge main1 dailydelta1 --merge-dst-range deleted 0 0 --rotate
echo "INFO: merging to main finished" | logger -p $PRIORITY echo "INDEXER INFO: merging to main finished" | logger -p $PRIORITY
sleep 5 sleep 5
echo "INFO: resetting daily delta started" | logger -p $PRIORITY echo "INDEXER INFO: resetting daily delta started" | logger -p $PRIORITY
$INDEXER --quiet dailydelta1 --rotate $INDEXER --quiet dailydelta1 --rotate
echo "INFO: resetting daily delta finished" | logger -p $PRIORITY echo "INDEXER INFO: resetting daily delta finished" | logger -p $PRIORITY