revert ResetBootstrapState removal on app termination since closing the db explicitly enforces checkout and clearing the side-car wal file
This commit is contained in:
parent
646f90ef43
commit
b9f391cf85
|
@ -557,8 +557,10 @@ func (app *BaseApp) Restart() error {
|
||||||
App: app,
|
App: app,
|
||||||
IsRestart: true,
|
IsRestart: true,
|
||||||
}, func(e *TerminateEvent) error {
|
}, func(e *TerminateEvent) error {
|
||||||
|
e.App.ResetBootstrapState()
|
||||||
|
|
||||||
// attempt to restart the bootstrap process in case execve returns an error for some reason
|
// attempt to restart the bootstrap process in case execve returns an error for some reason
|
||||||
defer app.Bootstrap()
|
defer e.App.Bootstrap()
|
||||||
|
|
||||||
return syscall.Exec(execPath, os.Args, os.Environ())
|
return syscall.Exec(execPath, os.Args, os.Environ())
|
||||||
})
|
})
|
||||||
|
|
|
@ -169,6 +169,8 @@ func (pb *PocketBase) Execute() error {
|
||||||
// trigger cleanups
|
// trigger cleanups
|
||||||
return pb.OnTerminate().Trigger(&core.TerminateEvent{
|
return pb.OnTerminate().Trigger(&core.TerminateEvent{
|
||||||
App: pb,
|
App: pb,
|
||||||
|
}, func(e *core.TerminateEvent) error {
|
||||||
|
return e.App.ResetBootstrapState()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue