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

Fix shutdown #335

Merged
merged 6 commits into from
Nov 24, 2023
Merged

Fix shutdown #335

merged 6 commits into from
Nov 24, 2023

Conversation

abbiemery
Copy link
Contributor

@abbiemery abbiemery commented Nov 10, 2023

Relates to #220 . This change is to enable blueapi to be shutdown with crtl+c when the activemq drops and it can no longer connect to it.

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b30dda7) 86.61% compared to head (30b53e3) 86.52%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     DiamondLightSource/blueapi#335      +/-   ##
==========================================
- Coverage   86.61%   86.52%   -0.09%     
==========================================
  Files          41       41              
  Lines        1554     1559       +5     
==========================================
+ Hits         1346     1349       +3     
- Misses        208      210       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@callumforrester callumforrester 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! Could do with a test or two

@abbiemery
Copy link
Contributor Author

I've added in a small check using the is_connected method. However, I am going to change up the stomp connection part slightly in another PR so it doesn't crash if you try start BlueApi without an activemq instance running. The tests will be changed/added too acordingly there.

@abbiemery abbiemery marked this pull request as ready for review November 24, 2023 11:32
Copy link
Contributor

@callumforrester callumforrester 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 and should be merged if it fixes a common failure case.
See minor nitpicks

tests/messaging/test_stomptemplate.py Outdated Show resolved Hide resolved
src/blueapi/service/handler.py Show resolved Hide resolved
Co-authored-by: Callum Forrester <callum.forrester@diamond.ac.uk>
@abbiemery abbiemery merged commit 885636a into main Nov 24, 2023
23 checks passed
@abbiemery abbiemery deleted the fix-shutdown branch November 24, 2023 11:52
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.

2 participants