INNER CODE UNIT · Go

timeoutDuration

OpenListTeam/OpenList-Mobile · openlist-lib/openlistlib/server.go:65

	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)...")

	// Get the database instance and execute WAL checkpoint
	gormDB := db.GetDb()
	if gormDB != nil {
		sqlDB, err := gormDB.DB()
		if err != nil {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…