Commit ac8bf067 authored by Łukasz Nowak's avatar Łukasz Nowak

- simplify


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30837 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f1e7cca3
......@@ -41,16 +41,10 @@ TIME=0
while true
do
SELECT="SELECT count(*) AS message_count FROM message;"
VALUE=`echo $SELECT | mysql $MYSQL_OPT | grep -v message`
if [ "$VALUE" == "0" ]
then
SELECT="SELECT count(*) AS message_count FROM message_queue;"
VALUE=`echo $SELECT | mysql $MYSQL_OPT | grep -v message`
if [ "$VALUE" == "0" ]
then
exit 0
fi
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`
if [ "$MESSAGE_VALUE" == "0" -a "$MESSAGE_QUEUE_VALUE" == 0 ] ; then
exit 0
fi
sleep $INTERVAL;
TIME="`expr $TIME + $INTERVAL`"
......
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