clean vnc instalce
This commit is contained in:
parent
91a46e6514
commit
a3a0537658
10
app.py
10
app.py
|
|
@ -13,7 +13,8 @@ logging.basicConfig(level=logging.INFO)
|
|||
logging.info("服务器启动")
|
||||
mcp = FastMCP("spider-server")
|
||||
|
||||
VNC_SERVER_HOST = "https://10.10.40.19"
|
||||
SERVER_HOST = "https://10.10.40.19"
|
||||
|
||||
SHELL_DIR = "./bin"
|
||||
@mcp.tool()
|
||||
async def mail_qq_spider(account: str, instance_id: int) -> str:
|
||||
|
|
@ -72,9 +73,9 @@ async def start_vnc_server() -> str:
|
|||
if process.returncode == 0:
|
||||
data["instance_id"] = instance_id
|
||||
data["message"] = f"Container vnc-browser-{instance_id} started"
|
||||
data["vnc_url"] = f"{VNC_SERVER_HOST}:{vnc_port}"
|
||||
data["websockify_url"] = f"{VNC_SERVER_HOST}:{websockify_port}/vnc_lite.html"
|
||||
data["cdp_url"] = f"{VNC_SERVER_HOST}:{cdp_port}"
|
||||
data["vnc_url"] = f"{SERVER_HOST}:{vnc_port}"
|
||||
data["websockify_url"] = f"{SERVER_HOST}:{websockify_port}/vnc_lite.html"
|
||||
data["cdp_url"] = f"{SERVER_HOST}:{cdp_port}"
|
||||
db.insert_instance_id(instance_id,vnc_port,cdp_port,websockify_port)
|
||||
logging.info(f"VNC实例启动成功: {data}")
|
||||
else:
|
||||
|
|
@ -188,7 +189,6 @@ def get_spider_code_list() -> str:
|
|||
|
||||
# 运行服务器
|
||||
if __name__ == "__main__":
|
||||
print("正在启动服务器...")
|
||||
mcp.run(transport="sse")
|
||||
# mcp.run(transport="stdio")
|
||||
|
||||
Loading…
Reference in New Issue