mirror of
https://github.com/chaos-zhu/easynode.git
synced 2026-10-07 15:48:10 +08:00
feat: 调整状态推送
This commit is contained in:
@@ -1027,9 +1027,9 @@ module.exports = (httpServer) => {
|
||||
collectData()
|
||||
|
||||
// 每n秒收集一次数据
|
||||
monitorTimer = setInterval(collectData, 2500)
|
||||
monitorTimer = setInterval(collectData, 2000)
|
||||
// 每n秒发送一次数据
|
||||
sendDataTimer = setInterval(sendData, 2000)
|
||||
sendDataTimer = setInterval(sendData, 1500)
|
||||
}
|
||||
|
||||
socket.on('disconnect', (reason) => {
|
||||
|
||||
@@ -266,7 +266,7 @@ const isConnecting = ref(false)
|
||||
|
||||
// 数据陈旧检测相关
|
||||
const dataHistory = ref([]) // 记录最近的数据快照
|
||||
const staleDataThreshold = 3 // 连续n次相同数据触发重连
|
||||
const staleDataThreshold = 10 // 连续n次相同数据触发重连
|
||||
|
||||
// 网速图表相关
|
||||
const networkChart = ref(null) // canvas元素引用
|
||||
|
||||
Reference in New Issue
Block a user