调整项目结构。修改工具类逻辑

This commit is contained in:
zw
2025-08-07 20:55:30 +08:00
parent 606a80a30f
commit 3f7c366278
7 changed files with 221 additions and 96 deletions

View File

@@ -6,6 +6,7 @@ from tidevice import Usbmux
from Entity.DeviceModel import DeviceModel
from Entity.Variables import tikTokApp, WdaAppBundleId
from Module.FlaskSubprocessManager import FlaskSubprocessManager
from Utils.LogManager import LogManager
threadLock = threading.Lock()
@@ -71,7 +72,13 @@ class Deviceinfo(object):
# 连接设备
def connectDevice(self, identifier):
d = wda.USBClient(identifier, 8100)
try:
d = wda.USBClient(identifier, 8100)
LogManager.info("启动wda成功", identifier)
except Exception as e:
LogManager.error("启动wda失败。请检查wda是否正常", identifier)
return
d.app_start(WdaAppBundleId)
d.home()
time.sleep(2)
@@ -82,6 +89,8 @@ class Deviceinfo(object):
"id": identifier
})
# 转发设备端口
def relayDeviceScreenPort(self):
try: