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

Update last seen id after yielding the whole batch #29

Merged
merged 4 commits into from Jul 26, 2020
Merged

Update last seen id after yielding the whole batch #29

merged 4 commits into from Jul 26, 2020

Conversation

zhulik
Copy link
Contributor

@zhulik zhulik commented Jul 23, 2020

Hello!

After further investigation I found out that it's very handy to know if an event comes from the very first batch. Such events must be ignored because they are historical data, clients usually need only newer events.

In order to achieve it I moved the assignment of the _last_seen_id after yielding the whole batch and exposed it as a property. Now it's possible to use the same approach as the official gui does: https://github.com/syncthing/syncthing/blob/main/gui/default/syncthing/core/eventService.js#L22

Thank you!

UPD: Catch one more timeout exception

@blakev blakev merged commit 3d2fb97 into blakev:master Jul 26, 2020
@blakev
Copy link
Owner

blakev commented Jul 26, 2020

Merged and pushed to pypi

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.

None yet

2 participants