[Erp5-report] r6782 - /erp5/trunk/products/CMFActivity/

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Apr 18 15:18:23 CEST 2006


Author: jerome
Date: Tue Apr 18 15:18:20 2006
New Revision: 6782

URL: http://svn.erp5.org?rev=6782&view=rev
Log:
Remove all old tic script and keep only zope_tic_loop, which now tics portal_alarm as well.


Removed:
    erp5/trunk/products/CMFActivity/zope_distribute_loop
    erp5/trunk/products/CMFActivity/zope_tic
    erp5/trunk/products/CMFActivity/zope_tic_loop1
    erp5/trunk/products/CMFActivity/zope_tic_loop2
    erp5/trunk/products/CMFActivity/zope_tic_loop3
Modified:
    erp5/trunk/products/CMFActivity/zope_tic_loop

Modified: erp5/trunk/products/CMFActivity/zope_tic_loop
URL: http://svn.erp5.org/erp5/trunk/products/CMFActivity/zope_tic_loop?rev=6782&r1=6781&r2=6782&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/zope_tic_loop (original)
+++ erp5/trunk/products/CMFActivity/zope_tic_loop Tue Apr 18 15:18:20 2006
@@ -1,6 +1,32 @@
 #!/bin/bash
+
+# CMFActivity tic script.
+# This script is for a standalone Zope instance running on localhost.
+# For clusters, GET distribute with the number of nodes, and GET tic
+# on each machine with the corresponding processing_node id.
+
+# Make sure this user exists in the portal, and has Member role
+[ -z $AUTH ] && AUTH=zope:zope
+[ -z $PORT ] && PORT=9080
+[ -z $SITE ] && ZOPE_TIC_LOOP_SITE=erp5
+
+[ -z $TMP ] && TMP=/tmp
+
+echo Starting tic on $SITE:$PORT with $AUTH
+
 while true; do
-wget -O /tmp/zope_distribute.out http://jp:jp@localhost:9673/coramy/portal_activities/distribute?node_count:int=1
-wget -O /tmp/zope_tic.out http://jp:jp@localhost:9673/coramy/portal_activities/tic?processing_node:int=1
-sleep 5
+  # distribute on nodes
+  wget -q -O $TMP/zope_distribute.out http://${AUTH}@localhost:${PORT}/${SITE}/portal_activities/distribute?node_count:int=1
+  
+  # execute registred activities for this node
+  wget -q -O $TMP/zope_tic.out http://${AUTH}@localhost:${PORT}/${SITE}/portal_activities/tic?processing_node:int=1
+  # sample for another node
+  #wget -q -O $TMP/zope_tic.out http://${AUTH}@anotherhost:${PORT}/${SITE}/portal_activities/tic?processing_node:int=2
+  
+  # tic alarms
+  wget -q -O $TMP/zope_alarm_tic.out http://${AUTH}@localhost:${PORT}/${SITE}/portal_alarms/tic
+  
+  # 10 is recommended on production servers, but 4 is enough for development
+  sleep 4
 done
+




More information about the Erp5-report mailing list