forked from platypush/platypush
15 lines
338 B
Python
15 lines
338 B
Python
from redis import Redis
|
|
|
|
from platypush.message.response import Response
|
|
from platypush.plugins import Plugin
|
|
|
|
|
|
class RedisPlugin(Plugin):
|
|
def send_message(self, queue, msg, *args, **kwargs):
|
|
redis = Redis(*args, **kwargs)
|
|
redis.rpush(queue, msg)
|
|
return Response(output={'state': 'ok'})
|
|
|
|
|
|
# vim:sw=4:ts=4:et:
|
|
|