临时提交

This commit is contained in:
2025-09-20 13:57:31 +08:00
parent e94902fedf
commit fa667d2520
3 changed files with 1 additions and 16 deletions

5
.idea/workspace.xml generated
View File

@@ -5,12 +5,7 @@
</component>
<component name="ChangeListManager">
<list default="true" id="eceeff5e-51c1-459c-a911-d21ec090a423" name="Changes" comment="20250904-初步功能已完成">
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Module/FlaskService.py" beforeDir="false" afterPath="$PROJECT_DIR$/Module/FlaskService.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Utils/AiUtils.py" beforeDir="false" afterPath="$PROJECT_DIR$/Utils/AiUtils.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Utils/ThreadManager.py" beforeDir="false" afterPath="$PROJECT_DIR$/Utils/ThreadManager.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/ScriptManager.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ScriptManager.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -81,7 +81,6 @@ class ThreadManager:
with ThreadPoolExecutor(max_workers=min(32, len(udids))) as executor:
future_map = {executor.submit(cls.stop, udid): udid for udid in udids}
for future in as_completed(future_map):
udid = future_map[future]
try:
@@ -90,7 +89,6 @@ class ThreadManager:
fail_list.append(f"设备{udid}停止失败:{reason}")
except Exception as exc:
fail_list.append(f"设备{udid}停止异常:{exc}")
if fail_list:
return 1001, fail_list, "停止失败"
return 200, [], "全部设备停止成功"

View File

@@ -31,14 +31,7 @@ class ScriptManager():
self.initialized = True # 标记已初始化
# 养号
def growAccount(self, udid, event, max_retries=None):
"""
自动养号方法,带重生机制
:param udid: 设备 UDID
:param event: 线程控制 Event
:param max_retries: 最大重试次数 (None 表示无限重试)
"""
retries = 10
def growAccount(self, udid, event):
while not event.is_set():
try:
@@ -141,7 +134,6 @@ class ScriptManager():
except Exception as e:
LogManager.method_error(f"[{udid}] 养号出现异常,将重启流程: {e}", "养号", udid)
retries += 1
time.sleep(3) # 等待后重生
# 观看直播