Files
iOSAI/Entity/Variables.py
zhangkai b514b7c329 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	.idea/workspace.xml
2025-09-03 19:03:57 +08:00

34 lines
747 B
Python

import threading
from typing import Dict, Any
from Entity.AnchorModel import AnchorModel
# wda apple bundle id
WdaAppBundleId = "com.yolozsAgent.wda.xctrunner"
# 全局主播列表
anchorList: list[AnchorModel] = []
# 线程锁
anchorListLock = threading.Lock()
# 打招呼数据
prologueList = []
# 评论列表
commentsList = []
# 存储主播名和session_id的字典
anchorWithSession = {}
token = ''
# 安全删除数据
def removeModelFromAnchorList(model: AnchorModel):
with anchorListLock:
anchorList.remove(model)
# 添加数据
def addModelToAnchorList(models: list[Dict[str, Any]]):
with anchorListLock:
for dic in models:
obj = AnchorModel.dictToModel(dic)
anchorList.append(obj)