X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=bin%2Firspy-update.sh;h=1df2b09f7fd320bb1c714c65e27cdd3e02b539c7;hp=8c2554dcee42f433f6b12c33c5a28364dfa08fe2;hb=bede31050ee10e9a8a3dd20f91ab9d62e0f5af66;hpb=43f7a1971573de64a5334ca639234735b83b66bb diff --git a/bin/irspy-update.sh b/bin/irspy-update.sh index 8c2554d..1df2b09 100755 --- a/bin/irspy-update.sh +++ b/bin/irspy-update.sh @@ -1,16 +1,24 @@ #!/bin/sh +# Copyright (c) 2010 Index Data, http://www.indexdata.com # -# wrapper for irspy.pl +# irspy-update.sh - wrapper for irspy.pl # # run irspy with a smaller set of records in a loop to avoid out-of-memory # +# for a fast update, run this: +# $ env irspy_test=Quick ./irspy-update.sh -home=/usr/local/src/git +home=/home/indexdata cd $home/irspy/bin || exit 2 -logdir=../tmp -lockfile=../tmp/irspy-update.lock +logdir=../log +lockfile=$logdir/irspy-update.lock +statusfile=$logdir/irspy-last-update.log + +# run a full update by default, use Quick for a fast update : ${irspy_test=Main} +mkdir -p $logdir || exit2 + if [ -f $lockfile ]; then pid=`cat $lockfile` if kill -0 $pid 2>/dev/null; then @@ -24,9 +32,12 @@ weekday=`date '+%w'` for i in 0 1 2 3 4 5 6 do logfile=$logdir/irspy-mod-$i.log.$weekday - YAZ_LOG=irspy,irspy_test,irspy_task nice -10 time perl -I../lib irspy.pl -n 50 -d -M 3500 -a -t $irspy_test -m 7,$i localhost:8018/IR-Explain---1 > $logfile 2>&1 + YAZ_LOG=irspy,irspy_test,irspy_task nice -10 time perl -I../lib irspy.pl -n 50 -d -M 3500 -f'cql.allRecords=1 not zeerex.disabled = 1' -t $irspy_test -r ../etc/dallas.rules -m 7,$i localhost:8018/IR-Explain---1 > $logfile 2>&1 + + sleep 1 # catch ctr-c before compressing the log gzip -f $logfile done rm -f $lockfile +date > $statusfile