[Erp5-report] r30837 - /erp5/trunk/products/CMFActivity/bin/wait_activities

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 24 10:25:50 CET 2009


Author: luke
Date: Tue Nov 24 10:25:47 2009
New Revision: 30837

URL: http://svn.erp5.org?rev=30837&view=rev
Log:
 - simplify

Modified:
    erp5/trunk/products/CMFActivity/bin/wait_activities

Modified: erp5/trunk/products/CMFActivity/bin/wait_activities
URL: http://svn.erp5.org/erp5/trunk/products/CMFActivity/bin/wait_activities?rev=30837&r1=30836&r2=30837&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/bin/wait_activities [utf8] (original)
+++ erp5/trunk/products/CMFActivity/bin/wait_activities [utf8] Tue Nov 24 10:25:47 2009
@@ -41,16 +41,10 @@
 
 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`"




More information about the Erp5-report mailing list