更新remote项,使其真正有作用,更新config到0.0.10

This commit is contained in:
SengokuCola
2025-03-17 11:53:57 +08:00
parent c86614bd29
commit 665ef54cdd
4 changed files with 22 additions and 13 deletions

View File

@@ -6,6 +6,7 @@ import os
import json
import threading
from src.common.logger import get_module_logger
from src.plugins.chat.config import global_config
logger = get_module_logger("remote")
@@ -92,13 +93,14 @@ class HeartbeatThread(threading.Thread):
self.running = False
def main():
"""主函数,启动心跳线程"""
# 配置
SERVER_URL = "http://hyybuth.xyz:10058"
HEARTBEAT_INTERVAL = 300 # 5分钟
# 创建并启动心跳线程
heartbeat_thread = HeartbeatThread(SERVER_URL, HEARTBEAT_INTERVAL)
heartbeat_thread.start()
return heartbeat_thread # 返回线程对象,便于外部控制
if global_config.remote_enable:
"""主函数,启动心跳线程"""
# 配置
SERVER_URL = "http://hyybuth.xyz:10058"
HEARTBEAT_INTERVAL = 300 # 5分钟
# 创建并启动心跳线程
heartbeat_thread = HeartbeatThread(SERVER_URL, HEARTBEAT_INTERVAL)
heartbeat_thread.start()
return heartbeat_thread # 返回线程对象,便于外部控制