-
Notifications
You must be signed in to change notification settings - Fork 258
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
refactor(send queue): refactor in preparation for media local echoes #4176
Conversation
051768a
to
f0b41e3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4176 +/- ##
==========================================
+ Coverage 84.86% 84.89% +0.02%
==========================================
Files 270 271 +1
Lines 29031 29035 +4
==========================================
+ Hits 24637 24648 +11
+ Misses 4394 4387 -7 ☔ View full report in Codecov by Sentry. |
Wait, a rename of serialized JSON field names is a breaking change, since the field name is encoded next to the value, IIRC. Will have to do the sqlite migration here too \o/ |
|
f0b41e3
to
acf9081
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and thank you for breaking into consumable parts.
…` to `load_dependent_send_queue_events`
…d_queue module No changes in functionality, only code motion.
In a next commit, the `QueuedEvent` will be renamed to `QueuedRequest`. This specifies which kind of request we want to send with the send queue; for now, it can only be an event.
Changelog: Renamed all the send-queue related "events" to "requests", so as to generalize usage of the send queue to not-events (e.g. medias, redactions, etc.).
acf9081
to
acf79a4
Compare
This refactors the send queue so that it can apply sending more abstract requests, instead of only sending plain events. This will generalize to media uploads soon, but in the future might also generalize to sending redactions, etc. So we now queue requests, update requests, and so on; which leads to some fun renaming in a massive patch, but no changes in functionality. Those would come in subsequent pull requests.
Indexeddb has a database format change, that is gently handled the same way we did for is_wedged vs wedged errors, that is: the migration applies at the reading boundary (we can't use the
#[serde(untagged)]
enum trick because we're storing a raw JSON value, and this is known to be buggy in serde). Sqlite hasn't been modified yet.Part of #1732.