2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-04-24 09:41:27 +00:00

Begin work to make shellserver work async

This commit is contained in:
Jarrod Johnson
2026-04-17 16:21:33 -04:00
parent 2650b11421
commit 2ef0748724

View File

@@ -121,16 +121,17 @@ class ShellSession(consoleserver.ConsoleSession):
customize the name of a new session.
"""
def __init__(self, node, configmanager, username, datacallback=None,
@classmethod
async def create(cls, node, configmanager, username, datacallback=None,
skipreplay=False, sessionid=None, width=80, height=24):
self.sessionid = sessionid
self.configmanager = configmanager
self.node = node
super(ShellSession, self).__init__(node, configmanager, username,
self = await super().__init__(node, configmanager, username,
datacallback, skipreplay,
width=width, height=height)
self.sessionid = sessionid
return self
def connect_session(self):
async def connect_session(self):
global activesessions
tenant = self.configmanager.tenant
if (self.configmanager.tenant, self.node, self.username) not in activesessions: