Closed oscb closed 7 months ago
:tada: This PR is included in version 1.2.1 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 0.4.2 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 1.3.2 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:
Problem reported that StartupFlushPolicy wouldn't send the pending upload events from the previous app launch.
Caused by concurrency: FlushPolicies get initialized before and without awaiting for storage restoration. Futhermore the Queue for upload is managed by the SegmentDestination plugin so there's no explicit way to await for that queue to be restored from the base client itself.
Solution:
shouldFlush
outside ofstart
(this is to be able to handle it with themanualFlush
)QueueFlushingPlugin
andSegmentDestination
to await for queue restoration and settings load when a flush is triggered. This guarantees that if the flush is triggered before the plugins are fully initialized (previous session events loaded) it will await for those operations to complete before uploading any events.