Changed signature of Allocation Stats Reporter

This commit is contained in:
Diptanu Choudhury
2016-05-25 12:49:38 -07:00
parent 3a2cce2419
commit 31af4e0ac4
3 changed files with 7 additions and 3 deletions

View File

@@ -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