mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 11:24:57 -05:00
docs(rate-limit): clarify awaited cleanup
This commit is contained in:
@@ -223,8 +223,9 @@ function createDatabaseStorageWrapper(
|
||||
};
|
||||
};
|
||||
|
||||
// Best-effort sweep of clearly-expired rows to bound table growth. A failure
|
||||
// here never blocks the request.
|
||||
// Best-effort sweep of clearly-expired rows to bound table growth. Without a
|
||||
// background handler, the request awaits cleanup so it survives teardown;
|
||||
// failures are logged and do not reject the request.
|
||||
const deleteExpiredRows = async (now: number) => {
|
||||
const cutoff = now - longestObservedWindow * 1000;
|
||||
await ctx.runInBackgroundOrAwait(
|
||||
|
||||
Reference in New Issue
Block a user