Hardcode agent stale timeout
This commit is contained in:
@@ -45,7 +45,7 @@ func handleStatus(stores Stores) http.HandlerFunc {
|
||||
}
|
||||
|
||||
if latest != nil {
|
||||
connected := time.Since(latest.LastSeenAt).Seconds() <= float64(cfg.AgentStaleAfterSeconds)
|
||||
connected := time.Since(latest.LastSeenAt).Seconds() <= float64(config.AgentStaleAfterSeconds)
|
||||
agent = map[string]any{
|
||||
"connected": connected,
|
||||
"last_seen_at": latest.LastSeenAt.Format(time.RFC3339Nano),
|
||||
@@ -69,7 +69,6 @@ func handleStatus(stores Stores) http.HandlerFunc {
|
||||
"settings": models.Settings{
|
||||
DefaultWaitSeconds: cfg.DefaultWaitSeconds,
|
||||
DefaultEmptyResponse: cfg.DefaultEmptyResponse,
|
||||
AgentStaleAfterSeconds: cfg.AgentStaleAfterSeconds,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user