fix chatmanager setting time
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import os, uuid, json
|
||||
from flask import Blueprint, current_app, session, redirect, url_for, render_template, request, jsonify
|
||||
from ..services.backboard_service import realtime_response
|
||||
from ..extension_ase.ase_client.manager import ChatManager
|
||||
import subprocess
|
||||
|
||||
bp = Blueprint("vscode", __name__)
|
||||
@@ -31,8 +32,9 @@ def desktop(user_uuid, course_id, chapter_name, lesson_name):
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Error creating directory {path_dir} details {str(e)}")
|
||||
|
||||
|
||||
chatmanager = current_app.extensions["user_uuid2chatmanager"][user_uuid]
|
||||
chatmanager = ChatManager()
|
||||
chatmanager.init(user_uuid, user_id, path_dir)
|
||||
current_app.extensions["user_uuid2chatmanager"][user_uuid] = chatmanager
|
||||
code_server_port = 10000 + int(uuid.uuid4().int % 10000)
|
||||
chatmanager.start_code_server(user_uuid, user_id, path_dir, code_server_port)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user