[gozerbot] push by bth...@gmail.com - increase maxpool and cmnd runners to 50 on 2011-08-09 23:09 GMT

0 views
Skip to first unread message

goze...@googlecode.com

unread,
Aug 9, 2011, 7:10:13 PM8/9/11
to gozerbo...@googlegroups.com
Revision: 95bc3d2b86cd
Author: Bart Thate <bth...@gmail.com>
Date: Tue Aug 9 16:08:47 2011
Log: increase maxpool and cmnd runners to 50
http://code.google.com/p/gozerbot/source/detail?r=95bc3d2b86cd

Modified:
/gozerbot/database/alchemy.py
/gozerbot/runner.py
/gozerbot/threads/threadloop.py

=======================================
--- /gozerbot/database/alchemy.py Tue Aug 9 11:26:09 2011
+++ /gozerbot/database/alchemy.py Tue Aug 9 16:08:47 2011
@@ -115,7 +115,7 @@
rlog(10, 'alchemy', 'starting database')

# create engine
- engine = create_engine(dburi, strategy='threadlocal',
pool_recycle=3600)
+ engine = create_engine(dburi, strategy='threadlocal', pool_recycle=60,
pool_size=50, max_overflow=0)

# setup metadata and session
if not base:
=======================================
--- /gozerbot/runner.py Sun Aug 7 05:34:49 2011
+++ /gozerbot/runner.py Tue Aug 9 16:08:47 2011
@@ -159,7 +159,7 @@

## global runners

-cmndrunners = defaultrunner = longrunner = Runners(20, BotEventRunner)
+cmndrunners = defaultrunner = longrunner = Runners(50, BotEventRunner)
cbrunners = Runners(100, BotEventRunner, doready=False)
waitrunners = Runners(10, Runner)

=======================================
--- /gozerbot/threads/threadloop.py Tue Jul 19 13:03:08 2011
+++ /gozerbot/threads/threadloop.py Tue Aug 9 16:08:47 2011
@@ -30,12 +30,10 @@
self.nowrunning = "none"

def _loop(self):
+ rlog(0, "threadloop", 'starting threadloop')
while not self.stopped:
try:
- rlog(0, "threadloop", 'starting threadloop')
self.running = True
-
-
try:
data = self.queue.get_nowait()
except Queue.Empty:
@@ -49,7 +47,7 @@

if not data:
break
- rlog(-1, self.name, 'running %s' % str(data))
+ rlog(0, self.name, 'running %s' % str(data))
self.handle(*data)
except Exception, ex: handle_exception()

Reply all
Reply to author
Forward
0 new messages