Merge pull request #1718 from metamx/task-duration

Adds task duration to indexer console for completed tasks.
This commit is contained in:
Xavier Léauté 2015-09-11 22:35:08 -07:00
commit 1715849642
1 changed files with 3 additions and 0 deletions

View File

@ -539,6 +539,9 @@ public class OverlordResource
} }
if (status.isPresent()) { if (status.isPresent()) {
data.put("statusCode", status.get().getStatusCode().toString()); data.put("statusCode", status.get().getStatusCode().toString());
if(status.get().isComplete()) {
data.put("duration", status.get().getDuration());
}
} }
return data; return data;
} }