Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try send stored apply events on init #46

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Try send stored apply events on init #46

merged 1 commit into from
Jul 26, 2023

Conversation

fabriziodemaria
Copy link
Member

Other than being good for delivering events faster and more reliably, this PR also aligns this Provider's init behaviour closer with the Swift Provider

@@ -40,6 +40,14 @@ class EventProcessor<INPUT, BatchProcessInputs, DATA>(
// ensures we don't have any shared mutability
val data: DATA = onInitialised()

// Try send events retrieved via "onInitialised()"
onProcessBatch(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we check already if the data is empty? i suppose we do it already in the onProcessBatch?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes exactly, data is filtered for valid events to send otherwise nothing happens

@fabriziodemaria fabriziodemaria merged commit 5c17335 into main Jul 26, 2023
1 check passed
@fabriziodemaria fabriziodemaria deleted the init-send branch July 26, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants