Speed up boot, prune stores

This commit is contained in:
Jon Staab
2026-03-12 11:33:04 -07:00
parent e6e11bb8f2
commit 5d6661f964
4 changed files with 277 additions and 235 deletions
+5 -4
View File
@@ -126,11 +126,12 @@
}),
])
// Set up our storage adapters
db.adapters = storage.adapters
const storageSync = storage.sync()
// Wait until data storage is initialized before syncing other stuff
await db.connect()
unsubscribers.push(storageSync.unsubscribe)
// Wait for critical storage data only
await storageSync.ready
// Close the database connection on reload
unsubscribers.push(() => db.close())