diff --git a/platypush/__init__.py b/platypush/__init__.py index 6c40b71e..ad7d303c 100644 --- a/platypush/__init__.py +++ b/platypush/__init__.py @@ -12,6 +12,7 @@ import traceback from threading import Thread +from .bus import Bus from .bus.redis import RedisBus from .config import Config from .context import register_backends @@ -120,7 +121,12 @@ class Daemon: def start(self): """ Start the daemon """ - self.bus = RedisBus(on_message=self.on_message()) + redis_conf = Config.get('backend.redis') + if redis_conf: + self.bus = RedisBus(on_message=self.on_message(), + **redis_conf.get('redis_args', {})) + else: + self.bus = Bus(on_message=self.on_message()) # Initialize the backends and link them to the bus self.backends = register_backends(bus=self.bus, global_scope=True)