Correction

This commit is contained in:
Michael RICOIS 2015-11-06 08:21:44 +00:00
parent 72fc6522ba
commit fb3596f696
7 changed files with 28 additions and 26 deletions

4
README
View File

@ -24,6 +24,10 @@ Sphinx Engine configuration
sed -i -e 's/ENV_MYSQLHOST/VALUE/g' indexer/*.sh
sed -i -e 's/ENV_MYSQLUSER/VALUE/g' indexer/*.sh
sed -i -e 's/ENV_MYSQLPASS/VALUE/g' indexer/*.sh
- Crontab
- Logrotate
Indexing
--------
indexer-*.sh : Index on master database with rotation

View File

@ -47,7 +47,9 @@ if [ -n "$idx" ]; then
nbT=$(echo $nbT|sed -e "s/^[nbT ]*//g"||sed -e "s/[ ]*$//g")
if [ -z "$nbC" ]; then
echo $nbC
elif [ -z "$nbT" ]; then
echo $nbT
elif [ "$nbT" -gt "$nbC" ]; then
# Create file to indicate indexing
@ -72,8 +74,6 @@ if [ -n "$idx" ]; then
echo "FIN $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION DIR" >> $PATH_LOG/indexer.log
fi
fi
fi

View File

@ -47,9 +47,10 @@ if [ -n "$idx" ]; then
nbT=$(echo $nbT|sed -e "s/^[nbT ]*//g"||sed -e "s/[ ]*$//g")
if [ -z "$nbC" ]; then
echo $nbC
elif [ -z "$nbT" ]; then
echo $nbT
elif [ "$nbT" -gt "$nbC" ]; then
# Create file to indicate indexing
rm -f $PATH_LOG/ent-*.idx
echo "START $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
@ -71,10 +72,7 @@ if [ -n "$idx" ]; then
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 -e "UPDATE sphinx_idx SET indexingEnd=NOW() WHERE id=$idx" >> $PATH_LOG/indexer.log
echo "FIN $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION ENT" >> $PATH_LOG/indexer.log
fi
fi
fi

View File

@ -1 +1 @@
SELECT count(*) AS etab from etablissements;
SELECT count(*) AS nb from etablissements;

View File

@ -1 +1 @@
SELECT count(*) AS etab_tmp from etablissements_tmp;
SELECT count(*) AS nb from etablissements_tmp;