force-restart-state #223

Merged
lash merged 13 commits from force-restart-state into master 2024-12-31 09:34:45 +01:00
Showing only changes of commit 50c006546c - Show all commits

View File

@ -53,25 +53,24 @@ func main() {
os.Exit(1)
}
// initialize the persister
// get the state
// restart the state
// persist the state
// exit
st := pe.GetState()
if st == nil {
logg.ErrorCtxf(ctx, "state fail in devtool", "state", st)
fmt.Errorf("cannot get state")
fmt.Println("cannot get state")
os.Exit(1)
}
st.Restart()
fmt.Println("The state:", st)
os.Exit(1)
// set empty Code to allow the menu to run from the top
st.Code = []byte{}
err = pe.Save(sessionId)
if err != nil {
logg.ErrorCtxf(ctx, "failed to persist the state and cache", "error", err)
os.Exit(1)
}
os.Exit(0)
}