迁移配置表

This commit is contained in:
ryan
2026-06-22 19:49:37 +08:00
parent d9b8dc81ee
commit 92ceecc6ce
53 changed files with 1928 additions and 1152 deletions
+3 -1
View File
@@ -30,7 +30,9 @@ func computeNodeStatus(node *model.OpenFlareNode) string {
if node.LastSeenAt == nil || node.LastSeenAt.IsZero() {
return nodeStatusPending
}
if time.Since(*node.LastSeenAt) > model.NodeOfflineThreshold {
// 使用默认阈值 2 分钟
threshold := 2 * time.Minute
if time.Since(*node.LastSeenAt) > threshold {
return nodeStatusOffline
}
return nodeStatusOnline