Merge pull request #2239 from tboerger/fix-proc-start-date

Fix procs.proc_started value if not set
This commit is contained in:
Brad Rydzewski 2017-10-06 13:31:32 -07:00 committed by GitHub
commit b727a3ce55

View file

@ -184,6 +184,10 @@ func (s *RPC) Update(c context.Context, id string, state rpc.State) error {
proc.State = model.StatusRunning proc.State = model.StatusRunning
} }
if proc.Started == 0 && proc.Stopped != 0 {
proc.Started = build.Started
}
if err := s.store.ProcUpdate(proc); err != nil { if err := s.store.ProcUpdate(proc); err != nil {
log.Printf("error: rpc.update: cannot update proc: %s", err) log.Printf("error: rpc.update: cannot update proc: %s", err)
} }