Skip to content

Commit

Permalink
fix: shell and logs websocket #28 #29
Browse files Browse the repository at this point in the history
Signed-off-by: devopstales <42894256+devopstales@users.noreply.github.com>
  • Loading branch information
devopstales committed Jun 17, 2023
1 parent b169926 commit 295e3de
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/kubedash/functions/routes.py
Expand Up @@ -14,7 +14,6 @@
from functions.registry import *

from functions.components import tracer, socketio, csrf
from threading import Lock
from opentelemetry.trace.status import Status, StatusCode


Expand All @@ -25,9 +24,6 @@
routes = Blueprint("routes", __name__)
logger = get_logger(__name__)

thread = None
thread_lock = Lock()

def authenticated_only(f):
@functools.wraps(f)
def wrapped(*args, **kwargs):
Expand Down Expand Up @@ -1149,10 +1145,6 @@ def message(data):
else:
user_token = None

#global thread
#with thread_lock:
# if thread is None:
# thread = socketio.start_background_task(k8sPodLogsStream, session['user_role'], user_token, session['ns_select'], data)
socketio.start_background_task(k8sPodLogsStream, session['user_role'], user_token, session['ns_select'], data)

##############################################################
Expand Down Expand Up @@ -1189,10 +1181,6 @@ def message(data):
global wsclient
wsclient = k8sPodExecSocket(session['user_role'], user_token, session['ns_select'], data)

#global thread
#with thread_lock:
# if thread is None:
# socketio.start_background_task(k8sPodExecStream, wsclient)
socketio.start_background_task(k8sPodExecStream, wsclient)

@socketio.on("exec-input", namespace="/exec")
Expand Down

0 comments on commit 295e3de

Please sign in to comment.