feat: Associate connected workspace agents with replicas (#4914)

This will enable displaying a graph that associates agents
to running replicas.
This commit is contained in:
Kyle Carberry
2022-11-06 13:27:09 -08:00
committed by GitHub
parent 267b81af83
commit 5be6c7071e
10 changed files with 52 additions and 21 deletions

View File

@ -522,6 +522,10 @@ func (api *API) workspaceAgentCoordinate(rw http.ResponseWriter, r *http.Request
LastConnectedAt: lastConnectedAt,
DisconnectedAt: disconnectedAt,
UpdatedAt: database.Now(),
LastConnectedReplicaID: uuid.NullUUID{
UUID: api.ID,
Valid: true,
},
})
if err != nil {
return err