Fix goal recovery
This commit is contained in:
parent
3846556035
commit
996f586bc1
1 changed files with 783 additions and 145 deletions
|
|
@ -40,6 +40,16 @@ func openStore(path string) (*store, error) {
|
|||
if err != nil {
|
||||
return nil, errors.Join(err, s.close())
|
||||
}
|
||||
for _, w := range s.Watches {
|
||||
if w.Known && w.Goal != nil && w.Goal.Status.waiting() && w.Turn.Status == "failed" {
|
||||
if w.Hold != nil && w.Goal.Status == "usageLimited" && w.Hold.Status == "usageLimited" {
|
||||
w.Hold = nil
|
||||
}
|
||||
if w.Hold == nil {
|
||||
w.Armed = true
|
||||
}
|
||||
}
|
||||
}
|
||||
return s, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue