Merge pull request #225 from sgotti/runservice_fix_handling_of_wrong_executortask_status
runservice: fix handling of wrong executortask status
This commit is contained in:
commit
eb180da914
|
@ -656,11 +656,13 @@ func (s *Runservice) updateRunTaskStatus(ctx context.Context, et *types.Executor
|
||||||
}
|
}
|
||||||
case types.ExecutorTaskPhaseStopped:
|
case types.ExecutorTaskPhaseStopped:
|
||||||
if rt.Status != types.RunTaskStatusStopped &&
|
if rt.Status != types.RunTaskStatusStopped &&
|
||||||
|
rt.Status != types.RunTaskStatusNotStarted &&
|
||||||
rt.Status != types.RunTaskStatusRunning {
|
rt.Status != types.RunTaskStatusRunning {
|
||||||
wrongstatus = true
|
wrongstatus = true
|
||||||
}
|
}
|
||||||
case types.ExecutorTaskPhaseSuccess:
|
case types.ExecutorTaskPhaseSuccess:
|
||||||
if rt.Status != types.RunTaskStatusSuccess &&
|
if rt.Status != types.RunTaskStatusSuccess &&
|
||||||
|
rt.Status != types.RunTaskStatusNotStarted &&
|
||||||
rt.Status != types.RunTaskStatusRunning {
|
rt.Status != types.RunTaskStatusRunning {
|
||||||
wrongstatus = true
|
wrongstatus = true
|
||||||
}
|
}
|
||||||
|
@ -672,7 +674,7 @@ func (s *Runservice) updateRunTaskStatus(ctx context.Context, et *types.Executor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if wrongstatus {
|
if wrongstatus {
|
||||||
log.Warnf("wrong executor task %q status: %q, rt status: %q", et.ID, et.Status.Phase, rt.Status)
|
log.Warnf("ignoring wrong executor task %q status: %q, rt status: %q", et.ID, et.Status.Phase, rt.Status)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue