GXX il y a 3 mois
Parent
commit
c6676bc7cc
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 2 2
      check_stat.py
  2. 1 1
      main.py

+ 2 - 2
check_stat.py

@@ -3,9 +3,9 @@ import requests
 from msg_send_save import send_feishu
 
 # 服务状态检查间隔(秒)
-CHECK_INTERVAL = 120  # 2分钟
+CHECK_INTERVAL = 180  # 2分钟
 # 心跳超时时间(秒)
-HEARTBEAT_TIMEOUT = 120  # 2分钟
+HEARTBEAT_TIMEOUT = 180  # 2分钟
 
 # 服务状态跟踪变量
 is_service_online = True  # 初始假设服务在线

+ 1 - 1
main.py

@@ -287,7 +287,7 @@ def chat():
             else:
                 send_group_message_word(group_id,"₍^ >ヮ<^₎")
     elif data_type == "meta_event":
-        if data["meta_event_type"] == "heartbeat":
+        if data["meta_event_type"] == "heartbeat" and data["status"]['online'] == True:
             last_heartbeat_time = data['time']
     return ""