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

chore(edgejobs): AddEdgeJob disregards async mode EE-4855 (#8287)

This commit is contained in:
matias-portainer 2023-01-26 11:32:11 -03:00 committed by GitHub
parent 5640cce4d6
commit a09fe7e10c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 86 additions and 16 deletions

View file

@ -67,7 +67,12 @@ func (handler *Handler) edgeJobTasksClear(w http.ResponseWriter, r *http.Request
return httperror.InternalServerError("Unable to clear log file from disk", err)
}
handler.ReverseTunnelService.AddEdgeJob(endpointID, edgeJob)
endpoint, err := handler.DataStore.Endpoint().Endpoint(endpointID)
if err != nil {
return httperror.NotFound("Unable to retrieve environment from the database", err)
}
handler.ReverseTunnelService.AddEdgeJob(endpoint, edgeJob)
err = handler.DataStore.EdgeJob().UpdateEdgeJob(edgeJob.ID, edgeJob)
if err != nil {