mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 18:05:42 +03:00
Always capture the finish time
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user