feat: throttle auto-monitor updates through shared pipeline#982
Merged
Conversation
577affc to
d12e5b9
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
1c0b4d5 to
23a2038
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors device auto-monitor signal updates so they are queued and flushed through a shared Redis pipeline at a throttled rate, reducing overhead and coping better with very high update rates (e.g. from ECMC).
Changes:
- Introduces a dedicated auto-monitor update thread that batches readback/config/limit updates and executes them via one shared Redis pipeline.
- Changes auto-monitor and limit subscriptions to enqueue updates (instead of publishing immediately) and ensures the update thread is running.
- Adds/updates unit tests to validate the new queueing, subscription behavior, and update-loop batching.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| bec_server/bec_server/device_server/devices/devicemanager.py | Adds throttled, batched auto-monitor update pipeline with a background thread; updates callbacks/subscriptions to enqueue updates. |
| bec_server/tests/tests_device_server/test_device_manager_ds.py | Adds test coverage for new auto-monitor queueing, thread-start behavior, and batched update loop execution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cappel89
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR moves the auto-monitored updates to a shared pipeline at a throttled update rate. This solves two issues:
Additional Comments
If we wanted to, we could further extend it in a follow-up PR to also provide support for the long-awaited "readout priority continous".
Definition of Done