mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 06:49:40 +02:00
fix(edgestacks): add a status update coordinator to increase performance BE-11572 (#337)
This commit is contained in:
parent
d35d8a7307
commit
9a86737caa
3 changed files with 182 additions and 39 deletions
|
@ -22,6 +22,7 @@ type Handler struct {
|
|||
GitService portainer.GitService
|
||||
edgeStacksService *edgestackservice.Service
|
||||
KubernetesDeployer portainer.KubernetesDeployer
|
||||
stackCoordinator *EdgeStackStatusUpdateCoordinator
|
||||
}
|
||||
|
||||
// NewHandler creates a handler to manage environment(endpoint) group operations.
|
||||
|
@ -33,6 +34,10 @@ func NewHandler(bouncer security.BouncerService, dataStore dataservices.DataStor
|
|||
edgeStacksService: edgeStacksService,
|
||||
}
|
||||
|
||||
h.stackCoordinator = NewEdgeStackStatusUpdateCoordinator(dataStore, h.updateEdgeStackStatus)
|
||||
|
||||
go h.stackCoordinator.Start()
|
||||
|
||||
h.Handle("/edge_stacks/create/{method}",
|
||||
bouncer.AdminAccess(bouncer.EdgeComputeOperation(httperror.LoggerHandler(h.edgeStackCreate)))).Methods(http.MethodPost)
|
||||
h.Handle("/edge_stacks",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue