diff --git a/.travis.requirements b/.travis.requirements index 5a7738ab1..ecf711049 100644 --- a/.travis.requirements +++ b/.travis.requirements @@ -4,3 +4,4 @@ requests flask redis python-dateutil +websockets diff --git a/platypush/backend/http/__init__.py b/platypush/backend/http/__init__.py index bebdf3dc3..7ce701530 100644 --- a/platypush/backend/http/__init__.py +++ b/platypush/backend/http/__init__.py @@ -116,9 +116,12 @@ class HttpBackend(Backend): def _get_redis(self): redis_backend = get_backend('redis') if not redis_backend: - raise RuntimeError('Redis backend not configured') + self.logger.warning('Redis backend not configured - some ' + + 'web server features may not be working properly') + redis_args = {} + else: + redis_args = redis_backend.redis_args - redis_args = get_backend('redis').redis_args redis = Redis(**redis_args) return redis diff --git a/platypush/context/__init__.py b/platypush/context/__init__.py index ef2142b72..3b1c1e10c 100644 --- a/platypush/context/__init__.py +++ b/platypush/context/__init__.py @@ -56,7 +56,7 @@ def get_backend(name): """ Returns the backend instance identified by name if it exists """ global backends - return backends[name] + return backends.get('name') def get_plugin(plugin_name, reload=False): diff --git a/tests/etc/config.yaml b/tests/etc/config.yaml index fbbf75808..e97c1bb2a 100644 --- a/tests/etc/config.yaml +++ b/tests/etc/config.yaml @@ -1,6 +1,3 @@ -backend.redis: - disabled: False - backend.http: port: 8123 disable_websocket: True