mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-09 05:05:52 +08:00
feat(nbstore): add nbstore worker (#9185)
This commit is contained in:
@@ -51,10 +51,10 @@ export class AwarenessFrontend {
|
||||
applyAwarenessUpdate(awareness, update.bin, origin);
|
||||
};
|
||||
const handleSyncCollect = () => {
|
||||
return {
|
||||
return Promise.resolve({
|
||||
docId: awareness.doc.guid,
|
||||
bin: encodeAwarenessUpdate(awareness, [awareness.clientID]),
|
||||
};
|
||||
});
|
||||
};
|
||||
const unsubscribe = this.sync.subscribeUpdate(
|
||||
awareness.doc.guid,
|
||||
|
||||
@@ -17,7 +17,7 @@ export class BlobFrontend {
|
||||
return this.sync ? this.sync.uploadBlob(blob) : this.storage.set(blob);
|
||||
}
|
||||
|
||||
addPriority(id: string, priority: number) {
|
||||
return this.sync?.addPriority(id, priority);
|
||||
addPriority(_id: string, _priority: number) {
|
||||
// not support yet
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ interface DocFrontendOptions {
|
||||
}
|
||||
|
||||
export class DocFrontend {
|
||||
private readonly uniqueId = `frontend:${this.storage.peer}:${nanoid()}`;
|
||||
private readonly uniqueId = `frontend:${nanoid()}`;
|
||||
|
||||
private readonly prioritySettings = new Map<string, number>();
|
||||
|
||||
@@ -88,7 +88,6 @@ export class DocFrontend {
|
||||
}),
|
||||
]);
|
||||
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
throwIfAborted(signal);
|
||||
const docId = await this.status.jobDocQueue.asyncPop(signal);
|
||||
|
||||
Reference in New Issue
Block a user