issue #0001932 : Make an sql update

This commit is contained in:
Michael RICOIS 2014-04-18 13:08:34 +00:00
parent d9249f0a41
commit 589da22cda

View File

@ -22,7 +22,7 @@ if [ -n "$idx" ]; then
if [[ "$idx" > 0 ]]; then
# Enregistrement Debut Indexation
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 -e "INSERT INTO sphinx_idx (indexingBegin) VALUES (NOW()) WHERE id=$idx"
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 -e "UPDATE sphinx_idx SET indexingBegin=NOW() WHERE id=$idx" >> $PATH_LOG/indexer.log
# Sphinx rotate
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Debut" >> $PATH_LOG/indexer.log
@ -30,7 +30,7 @@ if [ -n "$idx" ]; then
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Fin" >> $PATH_LOG/indexer.log
# Enregistrement Fin Indexation
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 -e "INSERT INTO sphinx_idx (indexingEnd) VALUES (NOW()) WHERE id=$idx"
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
fi
fi