fix: 全部检查跳过已删除账号,未捕获异常不再把内部错误返回给页面
This commit is contained in:
@@ -53,3 +53,36 @@ def fresh_database():
|
||||
users = autostudy_mod._status.get("users")
|
||||
if isinstance(users, dict):
|
||||
users.clear()
|
||||
from euniv import encrypt as encrypt_mod
|
||||
from euniv import service as service_mod
|
||||
from euniv import study_push
|
||||
|
||||
for pending in list(service_mod._pending.values()) + list(service_mod._pending_qr.values()):
|
||||
client = getattr(pending, "client", None)
|
||||
if client is not None:
|
||||
try:
|
||||
client.close()
|
||||
except Exception:
|
||||
pass
|
||||
service_mod._pending.clear()
|
||||
service_mod._pending_qr.clear()
|
||||
service_mod._pending_busy.clear()
|
||||
for handle in list(study_push._pending.values()):
|
||||
handle.cancel()
|
||||
study_push._pending.clear()
|
||||
study_push._inflight.clear()
|
||||
study_push._dirty.clear()
|
||||
study_push._urgent.clear()
|
||||
study_push._last_flush.clear()
|
||||
study_push._clients.clear()
|
||||
study_push._loop = None
|
||||
with encrypt_mod._lock:
|
||||
encrypt_mod._config.clear()
|
||||
encrypt_mod._config.update(
|
||||
{
|
||||
"path": encrypt_mod.DEFAULT_ENCRYPT_PATH,
|
||||
"js_url": encrypt_mod.DEFAULT_JS_URL,
|
||||
"loaded_at": 0.0,
|
||||
"retry_at": 0.0,
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user