fix: health_check 识别微信登录失效(loginCheck错误), 防止误报已登录
This commit is contained in:
@@ -202,10 +202,12 @@ def main():
|
|||||||
login_ok = True
|
login_ok = True
|
||||||
if port_ok and svc.get("login_check") and svc.get("docker_name"):
|
if port_ok and svc.get("login_check") and svc.get("docker_name"):
|
||||||
qr_showing = docker_log_check(svc["docker_name"], "扫码", minutes=10)
|
qr_showing = docker_log_check(svc["docker_name"], "扫码", minutes=10)
|
||||||
if qr_showing:
|
# 登录失效信号: loginCheck 错误 或 发消息时登录校验失败
|
||||||
|
login_err = docker_log_check(svc["docker_name"], "loginCheck", minutes=10)
|
||||||
|
if qr_showing or login_err:
|
||||||
login_ok = False
|
login_ok = False
|
||||||
entry["login_ok"] = False
|
entry["login_ok"] = False
|
||||||
entry["login_detail"] = "not_logged_in"
|
entry["login_detail"] = "not_logged_in" if qr_showing else "session_expired"
|
||||||
else:
|
else:
|
||||||
entry["login_ok"] = True
|
entry["login_ok"] = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user