This repository was archived by the owner on Sep 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
Allow parallel fetching #51
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Enable the EventStream to run fetchNextPage() in parallel for faster execution.
Keep in mind that exporting should not be broken.
event-stream-client/packages/actor-init-ldes-client/lib/EventStream.ts
Lines 177 to 197 in c9b4957
| 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
Assignees
Labels
enhancementNew feature or requestNew feature or request