update start.sh
This commit is contained in:
parent
bccb369fe9
commit
a6e2aed482
12
app.py
12
app.py
|
|
@ -21,10 +21,16 @@ async def mail_qq_spider(account: str,display: int) -> str:
|
|||
Returns:
|
||||
str: 爬虫结果
|
||||
"""
|
||||
os.environ['DISPLAY'] = f':{display}' # 改成你的 VNC 显示器编号
|
||||
|
||||
data={"display": display}
|
||||
try:
|
||||
os.environ['DISPLAY'] = f':{display}'
|
||||
result = await asyncio.to_thread(a1, account, display)
|
||||
return result
|
||||
data["status"] = 200
|
||||
data["result"] = result
|
||||
return json.dumps(data, ensure_ascii=False)
|
||||
except Exception as e:
|
||||
data["status"] = 500
|
||||
return json.dumps(data, ensure_ascii=False)
|
||||
@mcp.tool()
|
||||
async def start_vnc_server(display: int) -> str:
|
||||
"""启动VNC服务
|
||||
|
|
|
|||
Loading…
Reference in New Issue