diff --git a/models/actions/task.go b/models/actions/task.go index b73e0eab1a..05a9b19a3a 100644 --- a/models/actions/task.go +++ b/models/actions/task.go @@ -82,7 +82,6 @@ func (task *ActionTask) TakeTime() time.Duration { if task.Status.IsDone() { return task.Stopped.AsTime().Sub(started) } - task.Stopped.AsTime().Sub(started) return time.Since(started).Truncate(time.Second) } diff --git a/models/actions/task_step.go b/models/actions/task_step.go index bf7c77e2c5..181fec226d 100644 --- a/models/actions/task_step.go +++ b/models/actions/task_step.go @@ -35,7 +35,6 @@ func (step *ActionTaskStep) TakeTime() time.Duration { if step.Status.IsDone() { return step.Stopped.AsTime().Sub(started) } - step.Stopped.AsTime().Sub(started) return time.Since(started).Truncate(time.Second) }