mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Changed signature of Allocation Stats Reporter
This commit is contained in:
@@ -76,8 +76,8 @@ func (s *HTTPServer) ClientAllocRequest(resp http.ResponseWriter, req *http.Requ
|
||||
}
|
||||
|
||||
if task := req.URL.Query().Get("task"); task != "" {
|
||||
taskStats, err := allocStats.TaskStats(task)
|
||||
if err != nil {
|
||||
taskStats, ok := allocStats.AllocStats()[task]
|
||||
if !ok {
|
||||
return nil, CodedError(404, "task not present in allocation")
|
||||
}
|
||||
return taskStats.ResourceUsage(), nil
|
||||
|
||||
Reference in New Issue
Block a user