executor: fix stopping of not running tasks
When a related runningTask doesn't exist and the executor task status is running just report it as failed ignoring if it's marked to stop.
This commit is contained in:
parent
a4e280cd7d
commit
97d145a9d3
|
@ -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)
|
||||
et.Status.Phase = types.ExecutorTaskPhaseFailed
|
||||
et.Status.EndTime = util.TimeP(time.Now())
|
||||
|
|
Loading…
Reference in New Issue