mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 13:29:05 +01:00
Add success log message
This commit is contained in:
parent
5c5a9f8453
commit
8d4498f58e
@ -328,8 +328,8 @@ func (api *RestApi) stopJob(rw http.ResponseWriter, r *http.Request) {
|
|||||||
rw.WriteHeader(http.StatusOK)
|
rw.WriteHeader(http.StatusOK)
|
||||||
json.NewEncoder(rw).Encode(job)
|
json.NewEncoder(rw).Encode(job)
|
||||||
|
|
||||||
// We need to start a new goroutine as this functions need to return in order to
|
// We need to start a new goroutine as this functions needs to return
|
||||||
// make sure that the response is flushed to the client.
|
// for the response to be flushed to the client.
|
||||||
api.OngoingArchivings.Add(1) // So that a shutdown does not interrupt this goroutine.
|
api.OngoingArchivings.Add(1) // So that a shutdown does not interrupt this goroutine.
|
||||||
go func() {
|
go func() {
|
||||||
defer api.OngoingArchivings.Done()
|
defer api.OngoingArchivings.Done()
|
||||||
@ -347,6 +347,8 @@ func (api *RestApi) stopJob(rw http.ResponseWriter, r *http.Request) {
|
|||||||
log.Errorf("archiving job (dbid: %d) failed: %s", job.ID, err.Error())
|
log.Errorf("archiving job (dbid: %d) failed: %s", job.ID, err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Printf("archiving job (dbid: %d) successful", job.ID)
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user