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:
size = 4096
buf = ""
while size > 0:
iwtd, owtd, ewtd = select([conn], [], [], 0.1)
iwtd, owtd, ewtd = select([conn], [], [], 0.01)
if len(iwtd) == 0: break
data = conn.recv(size)
size -= len(data)
......@@ -372,4 +372,9 @@ Report bugs to <yo@nexedi.com>.'''
b.run()
if __name__ == "__main__":
try:
import psyco
psyco.full()
except:
pass
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