-
Notifications
You must be signed in to change notification settings - Fork 11
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
Make more use of AsyncStatus.wrap #694
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, but CI is complaining
return AsyncStatus( | ||
asyncio.wait_for(self._set_armed(demand), timeout=self.TIMEOUT) | ||
) | ||
@AsyncStatus.wrap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks.
I think we could move the code in _set_armed
in this set
here instead of keeping in split into two functions but I don't feel that strongly about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean make it an inner function of set
? We need the function so that we can wait on it with a timeout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but I don't mind either way
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #694 +/- ##
=======================================
Coverage 94.16% 94.16%
=======================================
Files 108 108
Lines 4302 4305 +3
=======================================
+ Hits 4051 4054 +3
Misses 251 251 ☔ View full report in Codecov by Sentry. |
* Make more use of AsyncStatus.wrap * Use RE in smargon so it has an event loop * Fix signature of stop * Fix some typing issues
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}