mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(infra): failed to get status when database not ready (#7470)
This commit is contained in:
@@ -238,6 +238,7 @@ export class IndexedDBJobQueue<J> implements JobQueue<J> {
|
||||
throttleTime(300, undefined, { leading: true, trailing: true }),
|
||||
exhaustMapWithTrailing(() =>
|
||||
fromPromise(async () => {
|
||||
await this.ensureInitialized();
|
||||
const trx = this.database.transaction(['jobs'], 'readonly');
|
||||
const remaining = await trx.objectStore('jobs').count();
|
||||
return { remaining };
|
||||
|
||||
Reference in New Issue
Block a user