-
Notifications
You must be signed in to change notification settings - Fork 2
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:ready check exceptions #19
Conversation
WalkthroughThe changes in this pull request modify the Changes
Possibly related PRs
Suggested labels
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
__init__.py (1)
81-84
: Approve simplification with a suggestionThe simplification of the loop exit condition is a good improvement. However, with the removal of explicit timeout handling, it might be beneficial to add a log message when the 60-second timeout is reached. This would help in debugging scenarios where the device doesn't become ready within the expected timeframe.
Consider adding a log message like this:
if monotonic() - start >= 60: LOG.warning("Device readiness check timed out after 60 seconds")
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- init.py (2 hunks)
🧰 Additional context used
🔇 Additional comments (2)
__init__.py (2)
48-49
: Approve transition to event-driven modelThe change from directly calling
self.handle_check_device_readiness()
to emitting a"mycroft.ready.check"
event is a good improvement. This transition to an event-driven model enhances decoupling and flexibility in the system's initialization process.
Line range hint
1-214
: Approve overall changesThe modifications in this PR successfully address the objective of fixing ready check exceptions. The transition to an event-driven model in the
initialize
method and the simplification of theis_device_ready
method work together to streamline the device readiness process. These changes enhance the flexibility and robustness of the system without introducing breaking changes.The code is now more maintainable and aligns well with event-driven programming principles. Good job on improving the
BootFinishedSkill
class!
Summary by CodeRabbit
New Features
Bug Fixes