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

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Apr 21 17:48:29 CEST 2010


Author: rafael
Date: Wed Apr 21 17:48:26 2010
New Revision: 34710

URL: http://svn.erp5.org?rev=34710&view=rev
Log:
Allow use different mysql executable, by using MYSQL=path/to/your/mysql ./wait_activities database


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=34710&r1=34709&r2=34710&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/bin/wait_activities [utf8] (original)
+++ erp5/trunk/products/CMFActivity/bin/wait_activities [utf8] Wed Apr 21 17:48:26 2010
@@ -24,6 +24,11 @@
 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 @@
 
 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




More information about the Erp5-report mailing list