feat(core): support syncing workspaces and blobs in the background (#4057)

This commit is contained in:
Alex Yang
2023-08-31 00:40:34 -05:00
committed by GitHub
parent 4e45554585
commit 55b3182799
9 changed files with 146 additions and 6 deletions
+2
View File
@@ -143,6 +143,7 @@ const fetchMetadata: FetchMetadata = async (get, { signal }) => {
removed.forEach(meta => {
metadata.splice(metadata.indexOf(meta), 1);
});
Adapter.Events['service:stop']?.();
continue;
}
try {
@@ -178,6 +179,7 @@ const fetchMetadata: FetchMetadata = async (get, { signal }) => {
} catch (e) {
console.error('list data error:', e);
}
Adapter.Events['service:start']?.();
}
}
const metadataMap = new Map(metadata.map(x => [x.id, x]));