Modified:
/gozerbot/monitor.py
/gozerbot/runner.py
=======================================
--- /gozerbot/monitor.py Tue Jul 19 13:03:08 2011
+++ /gozerbot/monitor.py Sun Aug 7 05:34:49 2011
@@ -22,7 +22,7 @@
from utils.trace import calledfrom
from config import config
from threads.threadloop import ThreadLoop
-from runner import cbrunners
+from runner import waitrunners
import threads.thr as thr
# basic imports
@@ -139,7 +139,7 @@
try:
if i[2]:
stats.up('monitors', thr.getname(str(i[2])))
- rlog(-10, 'jabbermonitor', 'checking inloop %s' %
str(i[2]))
+ rlog(-10, 'monitor', 'checking inloop %s' % str(i[2]))
doit = i[2](*args, **kwargs)
else:
doit = 1
@@ -150,12 +150,10 @@
if doit:
# run monitor callback in its own thread
- rlog(0, 'jabbermonitor', 'excecuting jabbermonitor
callback \
-%s' % i[0])
+ rlog(0, 'monitor', 'excecuting monitor callback %s' % i[0])
stats.up('monitors', thr.getname(str(i[1])))
-
if not i[3]:
- cbrunners.put("monitor-%s" % i[0], i[1], *args)
+ waitrunners.put("monitor-%s" % i[0], i[1], *args)
else:
thr.start_new_thread(i[1], args, kwargs)
=======================================
--- /gozerbot/runner.py Tue Jul 19 13:03:08 2011
+++ /gozerbot/runner.py Sun Aug 7 05:34:49 2011
@@ -48,7 +48,7 @@
#rlockmanager.acquire(getname(str(func)))
name = getname(str(func))
self.name = name
- rlog(0, "runner", 'running %s: %s' % (descr, name))
+ rlog(10, "runner", 'running %s: %s' % (descr, name))
self.starttime = time.time()
func(*args, **kwargs)
self.finished = time.time()
@@ -161,6 +161,7 @@
cmndrunners = defaultrunner = longrunner = Runners(20, BotEventRunner)
cbrunners = Runners(100, BotEventRunner, doready=False)
+waitrunners = Runners(10, Runner)
## runners_start