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

Add configuration option to disable status updates via message bus #331

Merged
merged 3 commits into from
Nov 10, 2023

Conversation

callumforrester
Copy link
Collaborator

As well as data documents, blueapi produces events when the status objects monitored by the run engine are updated. These events are useful for creating progress bars and similar updates. Unfortunately it seems very easy to unintentionally make plans/devices produce a very large number of these updates. The handling of all of these results in log spam and high CPU usage.

We're seeing this now on I22 and have seen similar problems before (see #111). I think the easy way to make debugging easier is to make the status update handling optional and easy to turn off via config. To that end...

Changes:

  • Add config option to disable status events
  • Make the worker only hook into the run engine if this option is marked as true

Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #331 (33d9010) into main (8151ca1) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #331      +/-   ##
==========================================
+ Coverage   86.57%   86.61%   +0.04%     
==========================================
  Files          41       41              
  Lines        1549     1554       +5     
==========================================
+ Hits         1341     1346       +5     
  Misses        208      208              
Files Coverage Δ
src/blueapi/config.py 97.10% <100.00%> (+0.13%) ⬆️
src/blueapi/service/handler.py 84.12% <100.00%> (ø)
src/blueapi/worker/reworker.py 94.44% <100.00%> (+0.04%) ⬆️

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link
Contributor

@rosesyrett rosesyrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; thanks for doing this. Am I alright to merge it in, make a release and try see if that fixes the problems we are seeing on i22?

@rosesyrett rosesyrett merged commit db5413f into main Nov 10, 2023
23 checks passed
@rosesyrett rosesyrett deleted the optional-status-events branch November 10, 2023 09:47
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