Run messagebus after registering plugins
This commit is contained in:
parent
8d26cd4d5d
commit
7ef7a3aebe
|
@ -13,10 +13,12 @@ def main():
|
||||||
"Main function"
|
"Main function"
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
mycroft = MessageBusClient()
|
mycroft = MessageBusClient()
|
||||||
mycroft.run_in_thread()
|
|
||||||
daemon = Daemon(config.OSD_URL, config.CAR_API_URL, mycroft)
|
daemon = Daemon(config.OSD_URL, config.CAR_API_URL, mycroft)
|
||||||
for plugin in plugins:
|
for plugin in plugins:
|
||||||
daemon.register_plugin(plugin)
|
daemon.register_plugin(plugin)
|
||||||
|
# Start mycroft after registering plugins so that an .on events by plugins
|
||||||
|
# get registered
|
||||||
|
mycroft.run_in_thread()
|
||||||
while True:
|
while True:
|
||||||
daemon.check_all()
|
daemon.check_all()
|
||||||
time.sleep(config.DELAY)
|
time.sleep(config.DELAY)
|
||||||
|
|
Loading…
Reference in New Issue