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

Method set_state

RoverSign/utils/sign_state.py:51–62  ·  view source on GitHub ↗

设置签到状态。

(sign_type: SignType)

Source from the content-addressed store, hash-verified

49
50 @staticmethod
51 def set_state(sign_type: SignType):
52 """设置签到状态。"""
53 state = {
54 "type": sign_type,
55 "start_time": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
56 }
57 try:
58 with open(STATE_FILE, 'w', encoding='utf-8') as f:
59 json.dump(state, f, ensure_ascii=False, indent=2)
60 logger.info(f"[库洛签到·签到状态] 创建状态文件: type={sign_type}")
61 except Exception as e:
62 logger.error(f"[库洛签到·签到状态] 创建状态文件失败: {e}")
63
64 @staticmethod
65 def clear_state():

Callers 3

rover_auto_signFunction · 0.80
rover_sign_recheck_allFunction · 0.80
check_and_resume_signingFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected