INNER CODE UNIT · Go
Start
OpenListTeam/OpenList-Mobile · openlist-lib/openlistlib/server.go:59
func Start() {
bootstrap.Start()
}
// Shutdown timeout 毫秒
func Shutdown(timeout int64) (err error) {
timeoutDuration := time.Duration(timeout) * time.Millisecond
bootstrap.Shutdown(timeoutDuration)
// Force database sync before shutdown
ForceDBSync()
//bootstrap.Release()
return nil
}
// ForceDBSync forces SQLite WAL checkpoint to sync data to main database file
func ForceDBSync() error {
log.Info("Forcing database sync (WAL checkpoint)...")