fix: 心跳403Error时炸心跳任务

This commit is contained in:
Oct-autumn
2025-05-21 15:57:23 +08:00
parent 34233628a6
commit 86b777fe4d
2 changed files with 60 additions and 51 deletions

View File

@@ -22,13 +22,21 @@ class LocalStoreManager:
def __getitem__(self, item: str) -> str | list | dict | int | float | bool | None:
"""获取本地存储数据"""
return self.store.get(item, None)
return self.store.get(item)
def __setitem__(self, key: str, value: str | list | dict | int | float | bool):
"""设置本地存储数据"""
self.store[key] = value
self.save_local_store()
def __delitem__(self, key: str):
"""删除本地存储数据"""
if key in self.store:
del self.store[key]
self.save_local_store()
else:
logger.warning(f"尝试删除不存在的键: {key}")
def __contains__(self, item: str) -> bool:
"""检查本地存储数据是否存在"""
return item in self.store