From 59d84c4fcb07bb2f4b792b67db59d9d682574495 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 24 Sep 2018 22:06:10 +0200 Subject: [PATCH] - Calling `on_message` on Redis backend to trigger the right logic instead of `self.bus.post` directly - For consistency `mset` now returns back the map of the set variables - Redis backend enabled on tests --- platypush/backend/redis.py | 2 +- platypush/plugins/variable.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/platypush/backend/redis.py b/platypush/backend/redis.py index 1fe93f074c..352f921598 100644 --- a/platypush/backend/redis.py +++ b/platypush/backend/redis.py @@ -69,7 +69,7 @@ class RedisBackend(Backend): while not self.should_stop(): msg = self.get_message() self.logger.info('Received message on the Redis backend: {}'.format(msg)) - self.bus.post(msg) + self.on_message(msg) # vim:sw=4:ts=4:et: diff --git a/platypush/plugins/variable.py b/platypush/plugins/variable.py index f16bdaf05f..68ac01e198 100644 --- a/platypush/plugins/variable.py +++ b/platypush/plugins/variable.py @@ -127,9 +127,12 @@ class VariablePlugin(Plugin): Set a variable or a set of variables on Redis. :param kwargs: Key-value list of variables to set (e.g. ``foo='bar', answer=42``) + + :returns: A map with the set variables """ - return self.redis_plugin.mset(**kwargs) + self.redis_plugin.mset(**kwargs) + return kwargs @action