Run messagebus after registering plugins

This commit is contained in:
Ceda EI 2020-12-31 16:39:09 +05:30
parent 8d26cd4d5d
commit 7ef7a3aebe
1 changed files with 3 additions and 1 deletions

View File

@ -13,10 +13,12 @@ def main():
"Main function"
logging.basicConfig(level=logging.DEBUG)
mycroft = MessageBusClient()
mycroft.run_in_thread()
daemon = Daemon(config.OSD_URL, config.CAR_API_URL, mycroft)
for plugin in plugins:
daemon.register_plugin(plugin)
# Start mycroft after registering plugins so that an .on events by plugins
# get registered
mycroft.run_in_thread()
while True:
daemon.check_all()
time.sleep(config.DELAY)