mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 01:09:54 +08: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 }),
|
throttleTime(300, undefined, { leading: true, trailing: true }),
|
||||||
exhaustMapWithTrailing(() =>
|
exhaustMapWithTrailing(() =>
|
||||||
fromPromise(async () => {
|
fromPromise(async () => {
|
||||||
|
await this.ensureInitialized();
|
||||||
const trx = this.database.transaction(['jobs'], 'readonly');
|
const trx = this.database.transaction(['jobs'], 'readonly');
|
||||||
const remaining = await trx.objectStore('jobs').count();
|
const remaining = await trx.objectStore('jobs').count();
|
||||||
return { remaining };
|
return { remaining };
|
||||||
|
|||||||
Reference in New Issue
Block a user