feat(core): new worker workspace engine (#9257)

This commit is contained in:
EYHN
2025-01-17 00:22:18 +08:00
committed by GitHub
parent 7dc470e7ea
commit a2ffdb4047
219 changed files with 4267 additions and 7194 deletions
@@ -73,10 +73,14 @@ export class BlobSyncImpl implements BlobSync {
async fullSync(signal?: AbortSignal) {
throwIfAborted(signal);
await this.storages.local.connection.waitForConnected(signal);
for (const [remotePeer, remote] of Object.entries(this.storages.remotes)) {
let localList: string[] = [];
let remoteList: string[] = [];
await remote.connection.waitForConnected(signal);
try {
localList = (await this.storages.local.list(signal)).map(b => b.key);
throwIfAborted(signal);
@@ -150,7 +154,7 @@ export class BlobSyncImpl implements BlobSync {
}
stop() {
this.abort?.abort();
this.abort?.abort(MANUALLY_STOP);
this.abort = null;
}