fix:移除Oper类静态属性

This commit is contained in:
jxxghp
2025-06-09 08:08:55 +08:00
parent aa039c6c05
commit ea168edb43
4 changed files with 9 additions and 7 deletions
+4 -3
View File
@@ -7,14 +7,15 @@ from app.utils.singleton import Singleton
class UserConfigOper(DbOper, metaclass=Singleton):
# 配置缓存
__USERCONF: Dict[str, Dict[str, Any]] = {}
"""
用户配置管理
"""
def __init__(self):
"""
加载配置到内存
"""
super().__init__()
self.__USERCONF = {}
for item in UserConfig.list(self._db):
self.__set_config_cache(username=item.username, key=item.key, value=item.value)