Feature/scan bundler device progress#893
Conversation
de4faef to
067ee2e
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
2b9ad1b to
f9c5462
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for reporting scan progress based on a device’s progress signal (via scan queue report_instructions), instead of always deriving progress from emitted scan points. It wires scan-queue-status handling into the ScanBundler and extends the BECEmitter to subscribe/unsubscribe to device progress topics and emit scan progress accordingly.
Changes:
- Subscribe ScanBundler to
scan_queue_statusand extract per-scanreport_instructionsintoscan_report_instructions. - Update BECEmitter to optionally subscribe to
device_progress/<device>and use that to emit scan progress (including cleanup/unsubscribe paths). - Extend scan bundler emitter tests to cover device-progress subscription behavior and cleanup.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| bec_server/bec_server/scan_bundler/scan_bundler.py | Track scan report instructions from scan queue status updates; trigger emitter cleanup earlier in storage cleanup. |
| bec_server/bec_server/scan_bundler/bec_emitter.py | Add device-progress-based scan progress reporting, subscription management, and last-progress emission on completion. |
| bec_server/tests/tests_scan_bundler/test_bec_emitter.py | Add/adjust unit tests covering device-progress subscriptions and scan progress emission behavior. |
Comments suppressed due to low confidence (2)
bec_server/bec_server/scan_bundler/scan_bundler.py:400
scan_report_instructionsis stored per scan id but never removed during cleanup. This can accumulate stale entries and leak memory across scans. Include it in the cleanup storages list.
for storage in [
"sync_storage",
"monitored_devices",
"baseline_devices",
"readout_priority",
]:
bec_server/bec_server/scan_bundler/scan_bundler.py:400
scan_report_instructionsis stored per scan id but never removed during cleanup. This can accumulate stale entries and leak memory across scans. Include it in the cleanup storages list.
for storage in [
"sync_storage",
"monitored_devices",
"baseline_devices",
"readout_priority",
]:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f9c5462 to
2c41676
Compare
2c41676 to
6357099
Compare
Description
This PR merges the scan progress update for monitored readouts and device progress into a single update for "scan progress". The scan bundler now automatically subscribes to the device for the scan and forwards the update accordingly.
Related Issues
How to test
Additional Comments
Once merged, we can simplify the subscription logic in BW.