Commit 39b4dfe6 authored by Rafael Monnerat's avatar Rafael Monnerat

Allow use different mysql executable, by using MYSQL=path/to/your/mysql ./wait_activities database



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34710 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e77f11de
......@@ -24,6 +24,11 @@ function show_help ( )
MYSQL_OPT=$1
INTERVAL=$2
TIMEOUT=$3
MYSQL_BIN=$MYSQL
if [ "$MYSQL_BIN" == "" ] ; then
MYSQL_BIN='mysql'
fi
if [ "$MYSQL_OPT" == "" ] ; then
show_help
......@@ -41,8 +46,8 @@ TIME=0
while true
do
MESSAGE_VALUE=`echo "SELECT count(*) AS message_count FROM message;" | mysql $MYSQL_OPT | grep -v message`
MESSAGE_QUEUE_VALUE=`echo "SELECT count(*) AS message_count FROM message_queue;" | mysql $MYSQL_OPT | grep -v message`
MESSAGE_VALUE=`echo "SELECT count(*) AS message_count FROM message;" | $MYSQL_BIN $MYSQL_OPT | grep -v message`
MESSAGE_QUEUE_VALUE=`echo "SELECT count(*) AS message_count FROM message_queue;" | $MYSQL_BIN $MYSQL_OPT | grep -v message`
if [ "$MESSAGE_VALUE" == "0" -a "$MESSAGE_QUEUE_VALUE" == 0 ] ; then
exit 0
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment