2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-15 12:17:47 +00:00

Change to eventlet.wsgi instead of patched flup scgi

This commit is contained in:
Jarrod Johnson 2013-10-03 17:05:40 -04:00
parent c9762cb536
commit 4c68da0d3b
2 changed files with 11 additions and 2 deletions

View File

@ -137,6 +137,8 @@ class ConsoleSession(object):
self.reaper.cancel()
currtime = util.monotonic_time()
deadline = currtime + 45
if self.databuffer is None:
return ""
while len(self.databuffer) == 0 and currtime < deadline:
timeo = deadline - currtime
self.conshdl._console.wait_for_data(timeout=timeo)

View File

@ -12,7 +12,8 @@ import json
import os
import string
import urlparse
scgi = eventlet.import_patched('flup.server.scgi')
import eventlet.wsgi
#scgi = eventlet.import_patched('flup.server.scgi')
consolesessions = {}
@ -152,7 +153,13 @@ def serve():
# either making apache deal with it
# or just supporting nginx or lighthttpd
# for now, http port access
scgi.WSGIServer(resourcehandler, bindAddress=("localhost",4004)).run()
#scgi.WSGIServer(resourcehandler, bindAddress=("localhost",4004)).run()
#based on a bakeoff perf wise, eventlet http support proxied actually did
#edge out patched flup. unpatched flup was about the same as eventlet http
#but deps are simpler without flup
#also, the potential for direct http can be handy
#todo remains unix domain socket for even http
eventlet.wsgi.server(eventlet.listen(("",4005)),resourcehandler)
class HttpApi(object):