From 5abfd70c53dafc751dc89bd399ae933ddfe10d9b Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Fri, 6 Oct 2017 22:15:08 +0200 Subject: [PATCH] Fix procs.proc_started value if not set --- server/rpc.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/rpc.go b/server/rpc.go index 973a549fb..ba747e95b 100644 --- a/server/rpc.go +++ b/server/rpc.go @@ -184,6 +184,10 @@ func (s *RPC) Update(c context.Context, id string, state rpc.State) error { proc.State = model.StatusRunning } + if proc.Started == 0 && proc.Stopped != 0 { + proc.Started = build.Started + } + if err := s.store.ProcUpdate(proc); err != nil { log.Printf("error: rpc.update: cannot update proc: %s", err) }