- 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
This commit is contained in:
parent
a4f075a4c1
commit
59d84c4fcb
2 changed files with 5 additions and 2 deletions
|
@ -69,7 +69,7 @@ class RedisBackend(Backend):
|
||||||
while not self.should_stop():
|
while not self.should_stop():
|
||||||
msg = self.get_message()
|
msg = self.get_message()
|
||||||
self.logger.info('Received message on the Redis backend: {}'.format(msg))
|
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:
|
# vim:sw=4:ts=4:et:
|
||||||
|
|
|
@ -127,9 +127,12 @@ class VariablePlugin(Plugin):
|
||||||
Set a variable or a set of variables on Redis.
|
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``)
|
: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
|
@action
|
||||||
|
|
Loading…
Reference in a new issue