Always capture the finish time
This commit is contained in:
parent
4338360da9
commit
beee130a6e
|
@ -715,11 +715,8 @@ func (r *AllocRunner) setTaskState(taskName, state string, event *structs.TaskEv
|
|||
}
|
||||
}
|
||||
case structs.TaskStateDead:
|
||||
// Capture the finished time. If it has never started there is no finish
|
||||
// time
|
||||
if !taskState.StartedAt.IsZero() {
|
||||
taskState.FinishedAt = time.Now().UTC()
|
||||
}
|
||||
// Capture the finished time.
|
||||
taskState.FinishedAt = time.Now().UTC()
|
||||
|
||||
// Find all tasks that are not the one that is dead and check if the one
|
||||
// that is dead is a leader
|
||||
|
|
Loading…
Reference in New Issue