Scripts is validated
This commit is contained in:
parent
418318bd01
commit
cb0229ae48
@ -6,8 +6,6 @@ MYSQL_HOST=192.168.3.30
|
||||
MYSQL_USER=sphinx
|
||||
MYSQL_PASS=indexer
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION CIBLAGE" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Is consolidated ?
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 < $PATH_SQL/consolidate-ciblage.sql)
|
||||
idx='';
|
||||
@ -21,6 +19,8 @@ idx=$(echo $idx|sed -e "s/^[idx ]*//g"||sed -e "s/[ ]*$//g")
|
||||
if [ -n "$idx" ]; then
|
||||
if [[ "$idx" > 0 ]]; then
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION CIBLAGE" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Enregistrement Debut Indexation
|
||||
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
|
||||
|
||||
@ -32,9 +32,9 @@ if [ -n "$idx" ]; then
|
||||
# Enregistrement Fin Indexation
|
||||
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 "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION CIBLAGE" >> $PATH_LOG/indexer.log
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION CIBLAGE" >> $PATH_LOG/indexer.log
|
||||
|
||||
|
||||
|
@ -6,8 +6,6 @@ MYSQL_HOST=192.168.3.30
|
||||
MYSQL_USER=sphinx
|
||||
MYSQL_PASS=indexer
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION DIR" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Is consolidated ?
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 < $PATH_SQL/consolidate-dir.sql)
|
||||
idx='';
|
||||
@ -21,6 +19,8 @@ idx=$(echo $idx|sed -e "s/^[idx ]*//g"||sed -e "s/[ ]*$//g")
|
||||
if [ -n "$idx" ]; then
|
||||
if [[ "$idx" > 0 ]]; then
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION DIR" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Enregistrement Debut Indexation
|
||||
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
|
||||
|
||||
@ -36,8 +36,8 @@ if [ -n "$idx" ]; then
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Rotation Table - Debut" >> $PATH_LOG/indexer.log
|
||||
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS jo < $PATH_SQL/rotate-dir.sql >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Rotation Table - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION DIR" >> $PATH_LOG/indexer.log
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION DIR" >> $PATH_LOG/indexer.log
|
||||
|
@ -6,8 +6,6 @@ MYSQL_HOST=192.168.3.30
|
||||
MYSQL_USER=sphinx
|
||||
MYSQL_PASS=indexer
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION ENT" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Is consolidated ?
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 < $PATH_SQL/consolidate-ent.sql)
|
||||
idx='';
|
||||
@ -21,6 +19,8 @@ idx=$(echo $idx|sed -e "s/^[idx ]*//g"||sed -e "s/[ ]*$//g")
|
||||
if [ -n "$idx" ]; then
|
||||
if [[ "$idx" > 0 ]]; then
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION ENT" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Enregistrement Debut Indexation
|
||||
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
|
||||
|
||||
@ -37,7 +37,7 @@ if [ -n "$idx" ]; then
|
||||
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS jo < $PATH_SQL/rotate-ent.sql >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Rotation Table - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION ENT" >> $PATH_LOG/indexer.log
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION ENT" >> $PATH_LOG/indexer.log
|
||||
|
@ -1,5 +1,5 @@
|
||||
SELECT id FROM sphinx_idx
|
||||
WHERE createEnd BETWEEN (NOW() - INTERVAL 1 HOUR) AND NOW()
|
||||
WHERE createEnd BETWEEN (NOW() - INTERVAL 2 HOUR) AND NOW()
|
||||
AND nom = 'jo.etablissements_act'
|
||||
AND indexingBegin IS NULL
|
||||
AND indexingEnd IS NULL
|
||||
|
Loading…
Reference in New Issue
Block a user