Fix procs.proc_started value if not set

This commit is contained in:
Thomas Boerger 2017-10-06 22:15:08 +02:00
parent bb8c569249
commit 5abfd70c53
No known key found for this signature in database
GPG key ID: 5A388F55283960B6

View file

@ -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)
}