Merge pull request #71 from sgotti/executor_set_task_endtime_when_marking_task_failed

executor: set task endTime when marking as failed
This commit is contained in:
Simone Gotti 2019-07-29 14:43:13 +02:00 committed by GitHub
commit e48a28d5b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1162,6 +1162,7 @@ func (e *Executor) taskUpdater(ctx context.Context, et *types.ExecutorTask) {
if !ok {
log.Infof("marking executor task %s as failed since there's no running task", et.ID)
et.Status.Phase = types.ExecutorTaskPhaseFailed
et.Status.EndTime = util.TimePtr(time.Now())
// mark in progress step as failed too
for _, s := range et.Status.Steps {
if s.Phase == types.ExecutorTaskPhaseRunning {