2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 01:22:00 +00:00

Reuse existing vinz unix session for a node

This commit is contained in:
Jarrod Johnson 2024-09-05 11:44:29 -04:00
parent f8715f4cb1
commit c048439849

View File

@ -37,14 +37,17 @@ def assure_vinz():
eventlet.sleep(0.5)
eventlet.spawn(monitor_requests)
_unix_by_nodename = {}
def get_url(nodename, inputdata):
method = inputdata.inputbynode[nodename]
assure_vinz()
if method == 'wss':
return f'/vinz/kvmsession/{nodename}'
elif method == 'unix':
return request_session(nodename)
if nodename not in _unix_by_nodename:
_unix_by_nodename[nodename] = request_session(nodename)
return _unix_by_nodename[nodename]
_usersessions = {}
def close_session(sessionid):