fix: optimize DB pull (#2589)

This commit is contained in:
Peng Xiao authored and GitHub committed 2023-05-31 11:09:18 +08:00
1 parent 2713340532
commit 617350fc7d
17 files changed
+619 -40

No files matched your search

+1 -1
View File
@@ -178,7 +178,7 @@ const createSQLiteProvider = (
async function syncBlobIntoSQLite(bs: BlobManager) {
const persistedKeys = await apis.db.getBlobKeys(blockSuiteWorkspace.id);
const allKeys = await bs.list();
const allKeys = await bs.list().catch(() => []);
const keysToPersist = allKeys.filter(k => !persistedKeys.includes(k));
logger.info('persisting blobs', keysToPersist, 'to sqlite');