-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Refactor - common bus connection method #2792
Conversation
Voight Kampff Integration Test Failed (Results). |
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.
One tiny nitpick (missing argument in docstring) otherwise it looks good.
I wonder if we should consider moving the mycroft.services.util
to mycroft.util.process_utils
or move the contents of that file into mycroft.service
since they seem heavily related.
Voight Kampff Integration Test Failed (Results). |
Yeah I started the new module as I originally thought of abstracting more of the duplicated code to ensure all the services operate consistently and explicitly continue to do so (maybe a Service base class?). But Good spot on the docstring too :) |
Voight Kampff Integration Test Failed (Results). |
2 similar comments
Voight Kampff Integration Test Failed (Results). |
Voight Kampff Integration Test Failed (Results). |
Very nice, tested and working. 👍 |
Voight Kampff Integration Test Failed (Results). |
2 similar comments
Voight Kampff Integration Test Failed (Results). |
Voight Kampff Integration Test Failed (Results). |
4e8bdb8
to
767d2d6
Compare
Voight Kampff Integration Test Failed (Results). |
to avoid code duplication, i would argue this should go into https://github.com/MycroftAI/mycroft-messagebus-client/ and the whole client folder in mycroft deprecated, mycroft-core only needs to contain the server, the Message object and the MessagebusClient can / should be imported from package above |
I don't disagree with this in principle, means that everyone is using a common client rather than the client in core diverging from the client for 3rd parties. This PR still seems like it's going in the right direction toward that end goal. |
Voight Kampff Integration Test Failed (Results). |
1 similar comment
Voight Kampff Integration Test Failed (Results). |
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.
Finally realized the issue here... The audioservices aren't registered...
The bus handlers was set to be registered when the bus started in an event handler, see audioservice.pyL211. Can't quite recall why this was I believe it was a performance thing.
I think you should be able to fix it by replacing the line with
self.load_services()
and renaming the load_services_callback
method to self.load_services
Tested locally before (failing) and after (succeeding) this commit
Voight Kampff Integration Test Succeeded (Results) |
ddfaf68
to
375adbb
Compare
Voight Kampff Integration Test Failed (Results). |
Voight Kampff Integration Test Succeeded (Results) |
Description
Following on from #2758 this switches the remaining Services to use the new common method for connecting to the message bus. This should only simplify the current code bringing together 4 different ways of doing the same thing.
How to test
Run Mycroft and ensure all Services start and connect to the message bus as expected.
Given the significance of changes to the startup flow of Services, each should be checked carefully.
Contributor license agreement signed?