1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(edgestacks): optimize the Edge Stack status update endpoint BE-11539 (#279)

This commit is contained in:
andres-portainer 2025-01-06 15:39:24 -03:00 committed by GitHub
parent 85f52d2574
commit d72b3a9ba2
5 changed files with 68 additions and 44 deletions

View file

@ -100,7 +100,9 @@ func (store *Store) initServices() error {
}
store.EndpointRelationService = endpointRelationService
edgeStackService, err := edgestack.NewService(store.connection, endpointRelationService.InvalidateEdgeCacheForEdgeStack)
edgeStackService, err := edgestack.NewService(store.connection, func(tx portainer.Transaction, ID portainer.EdgeStackID) {
endpointRelationService.Tx(tx).InvalidateEdgeCacheForEdgeStack(ID)
})
if err != nil {
return err
}