Add Supa account and search changes

This commit is contained in:
Fabian Freund
2026-05-22 18:10:22 +02:00
parent 3a19865b2e
commit 51289f1266
374 changed files with 54061 additions and 5013 deletions
@@ -51,6 +51,14 @@ UserDatabase userDatabase(Ref ref) {
},
);
}),
onAfterOpen: (db) async {
// Release any token reservations stranded by a prior crash so the
// tokens go back to the available pool. 10 minutes is generous —
// a real redemption round-trip is sub-second.
await db.searchTokensDao.releaseStaleReservations(
const Duration(minutes: 10),
);
},
);
DatabaseRegistry.instance.register('user', db);