1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

fix(edge) inconsistent heartbeat EE-5533 (#9011)

This commit is contained in:
cmeng 2023-06-02 10:36:14 +12:00 committed by GitHub
parent fb2646b70c
commit 4c2906e89d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View file

@ -1,15 +1,13 @@
package endpoints
import (
"net/http"
"sort"
"strconv"
"time"
"github.com/portainer/libhttp/request"
portainer "github.com/portainer/portainer/api"
"github.com/portainer/portainer/api/http/security"
"github.com/portainer/portainer/api/internal/endpointutils"
"net/http"
"sort"
"strconv"
httperror "github.com/portainer/libhttp/error"
"github.com/portainer/libhttp/response"
@ -104,7 +102,6 @@ func (handler *Handler) endpointList(w http.ResponseWriter, r *http.Request) *ht
if paginatedEndpoints[idx].EdgeCheckinInterval == 0 {
paginatedEndpoints[idx].EdgeCheckinInterval = settings.EdgeAgentCheckinInterval
}
paginatedEndpoints[idx].QueryDate = time.Now().Unix()
endpointutils.UpdateEdgeEndpointHeartbeat(&paginatedEndpoints[idx], settings)
if !query.excludeSnapshots {
err = handler.SnapshotService.FillSnapshotData(&paginatedEndpoints[idx])