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

refac(subscriber): factor out update construction #290

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Feb 17, 2022

This branch refactors how the aggregator task builds update messages. In
particular, it factors out the shared code between building the initial
update for a subscription and building the subsequent updates in
publish into methods that are called with an Include enum to
determine whether the update should include all tasks/resources/ops, or
just the ones since the last update. This makes the code in
add_instrument_subscription and in publish much easier to read.

This is just the refactor part from #289 split out into a separate
branch; this should make no functional change. If we decide that #289 is
the correct way to fix the bug, we can rebase that branch onto this, so
that it just includes the bugfix. This way, we can land the refactor
anyway, because I think it's nice.

This branch refactors how the aggregator task builds update messages. In
particular, it factors out the shared code between building the initial
update for a subscription and building the subsequent updates in
`publish` into methods that are called with an `Include` enum to
determine whether the update should include all tasks/resources/ops, or
just the ones since the last update. This makes the code in
`add_instrument_subscription` and in `publish` much easier to read.

This is just the refactor part from #289 split out into a separate
branch; this should make no functional change. If we decide that #289 is
the correct way to fix the bug, we can rebase that branch onto this, so
that it _just_ includes the bugfix. This way, we can land the refactor
anyway, because I think it's nice.
@hawkw hawkw force-pushed the eliza/refac-aggregator branch from 37c43d8 to 591f4bb Compare February 17, 2022 19:24
@hawkw hawkw merged commit f2a25ed into main Feb 17, 2022
@hawkw hawkw deleted the eliza/refac-aggregator branch February 17, 2022 21:22
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.

1 participant