Verified Commit f7c594cc authored by Fabio Manganiello's avatar Fabio Manganiello
Browse files

get_bus() should return a default RedisBus() instance if the main bus is not registered

parent b1491b80
......@@ -133,8 +133,11 @@ def get_plugin(plugin_name, reload=False):
def get_bus() -> Bus:
global main_bus
assert main_bus, 'The bus is not registered'
return main_bus
if main_bus:
return main_bus
from platypush.bus.redis import RedisBus
return RedisBus()
def get_or_create_event_loop():
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment