From e57f722bf38002a6863a379e887024eb8be15fc0 Mon Sep 17 00:00:00 2001 From: Paul Nasrat Date: Thu, 10 Oct 2013 14:46:26 -0400 Subject: [PATCH] Record termination time in state. Supercedes pull #1946 Upstream-commit: 2eb404ab14ef4b70e101cbb43c124651553de5d2 Component: engine --- components/engine/state.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/engine/state.go b/components/engine/state.go index 6480b9b428..484032be36 100644 --- a/components/engine/state.go +++ b/components/engine/state.go @@ -13,6 +13,7 @@ type State struct { Pid int ExitCode int StartedAt time.Time + FinishedAt time.Time Ghost bool } @@ -38,5 +39,6 @@ func (s *State) setRunning(pid int) { func (s *State) setStopped(exitCode int) { s.Running = false s.Pid = 0 + s.FinishedAt = time.Now() s.ExitCode = exitCode }