diff options
| author | Ziad Sawalha <github@highbridgellc.com> | 2011-05-08 23:23:54 -0500 |
|---|---|---|
| committer | Ziad Sawalha <github@highbridgellc.com> | 2011-05-08 23:23:54 -0500 |
| commit | ae0879f5d7ee8f1704c978e57d4b462500eb927a (patch) | |
| tree | 50c1a00995daac5c20dc694ef267c5de90274a79 /echo | |
| parent | b864c54f77dc0d48480a770f5c7983a70b25c056 (diff) | |
Working on echo server
Diffstat (limited to 'echo')
| -rw-r--r-- | echo/echo/server.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/echo/echo/server.py b/echo/echo/server.py index 1c65f28e..8c24aa8f 100644 --- a/echo/echo/server.py +++ b/echo/echo/server.py @@ -22,6 +22,7 @@ from paste.deploy import loadapp import sys from webob.exc import HTTPUnauthorized + # If ../echo/__init__.py exists, add ../ to Python search path, so that # it will override what happens to be installed in /usr/(local/)lib/python... POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), @@ -158,5 +159,6 @@ if __name__ == "__main__": app = loadapp("config:" + \ os.path.join(os.path.abspath(os.path.dirname(__file__)), ini), global_conf={"log_name": "echo.log"}) - - wsgi.server(eventlet.listen(('', port)), app) + listener = eventlet.listen(('', port)) + pool = eventlet.GreenPool(1000) + wsgi.server(listener, app, custom_pool=pool) |
