Commit ee4cb973 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Shorten the select timeout, and import psyco if possible.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@927 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8eff2dbc
...@@ -196,7 +196,7 @@ class Balancer: ...@@ -196,7 +196,7 @@ class Balancer:
size = 4096 size = 4096
buf = "" buf = ""
while size > 0: while size > 0:
iwtd, owtd, ewtd = select([conn], [], [], 0.1) iwtd, owtd, ewtd = select([conn], [], [], 0.01)
if len(iwtd) == 0: break if len(iwtd) == 0: break
data = conn.recv(size) data = conn.recv(size)
size -= len(data) size -= len(data)
...@@ -372,4 +372,9 @@ Report bugs to <yo@nexedi.com>.''' ...@@ -372,4 +372,9 @@ Report bugs to <yo@nexedi.com>.'''
b.run() b.run()
if __name__ == "__main__": if __name__ == "__main__":
try:
import psyco
psyco.full()
except:
pass
main() main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment