Merge pull request #223 from sgotti/executor_fix_stopping_of_not_running_task

executor: fix stopping of not running tasks
This commit is contained in:
Simone Gotti 2020-03-02 09:45:39 +01:00 committed by GitHub
commit 382705bde9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1168,7 +1168,7 @@ func (e *Executor) taskUpdater(ctx context.Context, et *types.ExecutorTask) {
}() }()
} }
if !et.Spec.Stop && et.Status.Phase == types.ExecutorTaskPhaseRunning { if et.Status.Phase == types.ExecutorTaskPhaseRunning {
log.Infof("marking executor task %s as failed since there's no running task", et.ID) log.Infof("marking executor task %s as failed since there's no running task", et.ID)
et.Status.Phase = types.ExecutorTaskPhaseFailed et.Status.Phase = types.ExecutorTaskPhaseFailed
et.Status.EndTime = util.TimeP(time.Now()) et.Status.EndTime = util.TimeP(time.Now())