Skip to content

Commit

Permalink
🐛 fix restart on pod not-found. (#649)
Browse files Browse the repository at this point in the history
regression: When pod is not-found, the hub should re-deploy the pod.

Signed-off-by: Jeff Ortel <jortel@redhat.com>
  • Loading branch information
jortel committed Jun 11, 2024
1 parent 861fbb0 commit 695da1e
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions task/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -794,19 +794,18 @@ func (m *Manager) updateRunning() {
}
running := task
pod, found := running.Reflect(m.cluster)
if !found {
continue
}
if task.StateIn(Succeeded, Failed) {
err = m.podSnapshot(running, pod)
if err != nil {
Log.Error(err, "")
continue
}
err = running.Delete(m.Client)
if err != nil {
Log.Error(err, "")
continue
if found {
if task.StateIn(Succeeded, Failed) {
err = m.podSnapshot(running, pod)
if err != nil {
Log.Error(err, "")
continue
}
err = running.Delete(m.Client)
if err != nil {
Log.Error(err, "")
continue
}
}
}
err = m.DB.Save(&running).Error
Expand Down

0 comments on commit 695da1e

Please sign in to comment.