feat: calculate duration

This commit is contained in:
Jason Song
2023-01-05 16:19:08 +08:00
parent c510fdbcf1
commit a4b2cf2426
8 changed files with 82 additions and 39 deletions

View File

@@ -156,7 +156,7 @@ func ViewPost(ctx *context_module.Context) {
for i, v := range steps {
resp.StateData.CurrentJobSteps[i] = ViewJobStep{
Summary: v.Name,
Duration: float64(v.TakeTime() / time.Second),
Duration: float64(v.Duration() / time.Second),
Status: v.Status.String(),
}
}