Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Allow parallel fetching  #51

@KasperZutterman

Description

@KasperZutterman

Enable the EventStream to run fetchNextPage() in parallel for faster execution.
Keep in mind that exporting should not be broken.

public async _read() {
try {
if (!this.downloading && this.paused) {
super.pause();
}
else if (!this.downloading && !this.isPaused() && this.bookkeeper.nextFragmentExists()) {
if (!this.disableSynchronization && this.bookkeeper.inSyncingMode() && !this.syncingmode) {
this.syncingmode = true;
this.emit('now only syncing');
}
await this.fetchNextPage();
}
else if (!this.downloading) {
//end of the stream
this.log('info', "done");
this.push(null);
}
} catch (e) {
console.error(e);
}
}

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions