MCPcopy Create free account
hub / github.com/Loping151/RoverSign / get_state

Method get_state

RoverSign/utils/sign_state.py:36–48  ·  view source on GitHub ↗

获取当前签到状态。返回 {"type", "start_time"} 或 None。

()

Source from the content-addressed store, hash-verified

34
35 @staticmethod
36 def get_state() -> Optional[dict]:
37 """获取当前签到状态。返回 {"type", "start_time"} 或 None。"""
38 if not STATE_FILE.exists():
39 return None
40
41 try:
42 with open(STATE_FILE, 'r', encoding='utf-8') as f:
43 state = json.load(f)
44 logger.debug(f"[库洛签到·签到状态] 读取状态文件: {state}")
45 return state
46 except Exception as e:
47 logger.error(f"[库洛签到·签到状态] 读取状态文件失败: {e}")
48 return None
49
50 @staticmethod
51 def set_state(sign_type: SignType):

Callers 3

should_resumeMethod · 0.80
rover_sign_recheck_allFunction · 0.80
check_and_resume_signingFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected