2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-06-23 07:40:52 +00:00

Correct a number of issues

There were a number of careless mistakes in the feature, correct
the bad usage and typos.
This commit is contained in:
Jarrod Johnson
2016-03-26 09:34:46 -04:00
parent 44a5c2b464
commit 50aefee728
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -69,7 +69,7 @@ class AsyncTermRelation(object):
self.termid = termid
def got_data(self, data):
self.async.add(data, self.termid)
self.async.add(self.termid, data)
class AsyncSession(object):
@@ -82,8 +82,8 @@ class AsyncSession(object):
self.consoles = set([])
self.reaper = eventlet.spawn_after(15, self.destroy)
def add(self, rsp, requestid):
self.responses.append((rsp, requestid))
def add(self, requestid, rsp):
self.responses.append((requestid, rsp))
if self._evt:
self._evt.send()
self._evt = None
@@ -93,7 +93,7 @@ class AsyncSession(object):
# to what object (since the callback does not provide context
# for data, and here ultimately the client is responsible
# for sorting out which is which.
termrel = AsyncTermRelation(['HTTP_CONFLUENTREQUESTID'], self)
termrel = AsyncTermRelation(env['HTTP_CONFLUENTREQUESTID'], self)
self.termrelations.append(termrel)
return termrel
@@ -144,7 +144,7 @@ def run_handler(hdlr, env):
def get_async(env, querydict):
global _cleanthread
return _asyncsessions[querydict['asyncid']]['asyncsession']
return _asyncsessions[env['HTTP_CONFLUENTASYNCID']]['asyncsession']
def handle_async(env, querydict, threadset):
+1 -1
View File
@@ -423,7 +423,7 @@ def resourcehandler_backend(env, start_response):
return
sessid = _assign_consessionid(consession)
if async:
async.add_consolesession(sessid)
async.add_console_session(sessid)
start_response('200 OK', headers)
yield '{"session":"%s","data":""}' % sessid
return