add task duration in response for completed tasks

This commit is contained in:
Nishant 2015-09-10 13:45:20 +05:30
parent e5532367e1
commit 4681ff22ed
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;
} }